Fix NPE caused by null cancel operation.

This commit is contained in:
Rsl1122 2017-09-03 18:34:09 +03:00
parent d9b287ff9a
commit affef9f8ec

View File

@ -130,7 +130,7 @@ public class TestInit {
return new RunnableFactory<Plan>(planMock) {
@Override
public IRunnable createNew(String name, final AbsRunnable runnable) {
return new IRunnable() {
IRunnable iRunnable = new IRunnable() {
Timer timer = new Timer();
TimerTask task = new TimerTask() {
@Override
@ -194,6 +194,8 @@ public class TestInit {
return ticks * 50;
}
};
runnable.setCancellable(iRunnable);
return iRunnable;
}
};
}