Commit 6ed9535a authored by lihao's avatar lihao

validate data is not empty

parent 3b89d155
...@@ -69,6 +69,7 @@ public class TaskExecutor<T, U, R> { ...@@ -69,6 +69,7 @@ public class TaskExecutor<T, U, R> {
TaskDefinition<T, U, R> t = this.task; TaskDefinition<T, U, R> t = this.task;
Collection<T> data = t.getData(); Collection<T> data = t.getData();
if (null == data || data.isEmpty()) { if (null == data || data.isEmpty()) {
log.warn("data is empty");
return false; return false;
} }
countDownLatch = new CountDownLatch(data.size()); countDownLatch = new CountDownLatch(data.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment