cleanup redundant code

This commit is contained in:
Fangjin Yang 2012-11-05 11:19:55 -08:00
parent b4e3f98f4b
commit 6b247f1599
1 changed files with 3 additions and 5 deletions

View File

@ -173,11 +173,9 @@ public class RemoteTaskRunner implements TaskRunner
@Override
public boolean apply(@Nullable WorkerWrapper input)
{
if (!input.getRunningTasks().isEmpty()) {
return false;
}
return System.currentTimeMillis() - input.getLastCompletedTaskTime().getMillis()
> config.getmaxWorkerIdleTimeMillisBeforeDeletion();
return input.getRunningTasks().isEmpty()
&& System.currentTimeMillis() - input.getLastCompletedTaskTime().getMillis()
> config.getmaxWorkerIdleTimeMillisBeforeDeletion();
}
}
)