mxsm commented on code in PR #5948:
URL: https://github.com/apache/rocketmq/pull/5948#discussion_r1090138679


##########
namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:
##########
@@ -678,10 +678,7 @@ public TopicRouteData pickupTopicRouteData(final String 
topic) {
                     if (null == brokerData) {
                         continue;
                     }
-                    BrokerData brokerDataClone = new 
BrokerData(brokerData.getCluster(),
-                        brokerData.getBrokerName(),
-                        (HashMap<Long, String>) 
brokerData.getBrokerAddrs().clone(),
-                        brokerData.isEnableActingMaster(), 
brokerData.getZoneName());
+                    BrokerData brokerDataClone = new BrokerData(brokerData);

Review Comment:
   > why not make a deep copy of a BrokerData
   
   I see that the constructor does the job @fuyou001 



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