You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/12/07 06:21:45 UTC

[GitHub] [rocketmq] zhaohai1299002788 commented on a change in pull request #3595: [ISSUE #3593] entrySet() replace keySet()

zhaohai1299002788 commented on a change in pull request #3595:
URL: https://github.com/apache/rocketmq/pull/3595#discussion_r763670502



##########
File path: test/src/main/java/org/apache/rocketmq/test/util/MQAdmin.java
##########
@@ -123,10 +124,10 @@ public static boolean isBrokerExist(String ns, String ip) {
             return false;
         } else {
             HashMap<String, BrokerData> brokers = clusterInfo.getBrokerAddrTable();
-            for (String brokerName : brokers.keySet()) {
-                HashMap<Long, String> brokerIps = brokers.get(brokerName).getBrokerAddrs();
-                for (long brokerId : brokerIps.keySet()) {
-                    if (brokerIps.get(brokerId).contains(ip))
+            for (Entry<String, BrokerData> brokerNameEntry : brokers.entrySet()) {

Review comment:
       already edited




-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org