mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
= code cleanup
- for loop replaceable with enhanced 'for' loop - using diamond in generic type - collapse try catch exception - using try-with-resource - using List#sort instead of Collections#sort - replaced lambda with method reference - using native compare method to compare numbers - using switch instead of if for in ESSyncUtil
This commit is contained in:
@@ -191,7 +191,7 @@ public class ZooKeeperMetaManager extends AbstractCanalLifeCycle implements Cana
|
||||
}
|
||||
|
||||
// 找到最小的Id
|
||||
ArrayList<Long> batchIds = new ArrayList<Long>(nodes.size());
|
||||
ArrayList<Long> batchIds = new ArrayList<>(nodes.size());
|
||||
for (String batchIdString : nodes) {
|
||||
batchIds.add(Long.valueOf(batchIdString));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user