#502 Check if key blank before instantiate new list.
This commit is contained in:
parent
51dd3db7c3
commit
d8b768b8a7
@ -107,14 +107,16 @@ public class TaskDispatcher {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dataSize == 0) {
|
||||
keys = new ArrayList<>();
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(key)) {
|
||||
keys.add(key);
|
||||
dataSize++;
|
||||
}
|
||||
keys.add(key);
|
||||
dataSize++;
|
||||
|
||||
if (dataSize == partitionConfig.getBatchSyncKeyCount() ||
|
||||
(System.currentTimeMillis() - lastDispatchTime) > partitionConfig.getTaskDispatchPeriod()) {
|
||||
|
Loading…
Reference in New Issue
Block a user