Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.4.0
-
Reviewed
Description
Currently, the code is as below:
for (ReplicaInfo replicaInfo : replicaSet) { checkBlock(replicaInfo); if (curSet == null) { // Add an entry for block pool if it does not exist already curSet = new LightWeightResizableGSet<>(); map.put(bp, curSet); } curSet.put(replicaInfo); }
the statment :
if(curSet == null)
should be moved to outside from the for loop.
Attachments
Issue Links
- links to