frankvicky commented on code in PR #16767:
URL: https://github.com/apache/kafka/pull/16767#discussion_r1705689170


##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointConnector.java:
##########
@@ -186,6 +192,8 @@ public boolean alterOffsets(Map<String, String> 
connectorConfig, Map<Map<String,
 
     private void refreshConsumerGroups()
             throws InterruptedException, ExecutionException {
+        // Checking null to avoid NPE.
+        Set<String> knownConsumerGroups = 
Objects.isNull(this.knownConsumerGroups) ? Collections.emptySet() : 
this.knownConsumerGroups;

Review Comment:
   That makes sense. The current comment is too brief to convey why the NPE 
check is needed. To understand it, one would have to read the code and grasp 
how it works. I will make the comment more specific to clarify its necessity.
   
   Thank you for pointing that out. 🙇🏼 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to