KurtYoung commented on a change in pull request #10328: [FLINK-14962] fix 
findbugs WMI_WRONG_MAP_ITERATOR  warning
URL: https://github.com/apache/flink/pull/10328#discussion_r352959840
 
 

 ##########
 File path: 
flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java
 ##########
 @@ -893,11 +892,10 @@ private void 
handlePendingFilesForPreviousCheckpoints(Map<Long, List<String>> pe
 
                LOG.debug("Moving pending files to final location on restore.");
 
-               Set<Long> pastCheckpointIds = 
pendingFilesPerCheckpoint.keySet();
-               for (Long pastCheckpointId : pastCheckpointIds) {
-                       // All the pending files are buckets that have been 
completed but are waiting to be renamed
-                       // to their final name
-                       for (String filename : 
pendingFilesPerCheckpoint.get(pastCheckpointId)) {
+               for (Map.Entry<Long, List<String>> entry : 
pendingFilesPerCheckpoint.entrySet()) {
+                       Long pastCheckpointId = entry.getKey();
 
 Review comment:
   Please keep the comment. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to