Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   What's wrong with this code? :) (http://www.chiefdelphi.com/forums/showthread.php?t=104000)

mwtidd 29-02-2012 07:00

What's wrong with this code? :)
 
Not really sure how I let this one sneak in.

Code:

public abstract class NeverEndingCommand extends Command{

    protected void interrupted() {
        //override for pids
    }
   
    protected boolean isFinished(){
        return true;
    }
   
    protected void end(){
        //never called
    }
}


Cosine 03-03-2012 10:17

Re: What's wrong with this code? :)
 
It depends. What is the code supposed to do, and what is it currently doing?

gixxy 12-03-2012 22:51

Re: What's wrong with this code? :)
 
if it is returning true in isFinished() it will end every time it starts.

Change that to false and it will never end.


All times are GMT -5. The time now is 09:48.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi