yx9o commented on code in PR #9554:
URL: https://github.com/apache/rocketmq/pull/9554#discussion_r2217307043


##########
broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:
##########
@@ -386,11 +387,7 @@ public void scanNotActiveChannel() {
     }
 
     public HashSet<String> queryTopicConsumeByWho(final String topic) {
-        HashSet<String> groups = new HashSet<>();
-        if (this.topicGroupTable.get(topic) != null) {
-            groups.addAll(this.topicGroupTable.get(topic));
-        }
-        return groups;
+        return new 
HashSet<>(Optional.ofNullable(topicGroupTable.get(topic)).orElse(new 
HashSet<>()));

Review Comment:
   Thank you, it has been updated, please review again.



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