|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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
}
}
|
|
#2
|
|||
|
|||
|
Re: What's wrong with this code? :)
It depends. What is the code supposed to do, and what is it currently doing?
|
|
#3
|
||||
|
||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|