jonyangx commented on code in PR #2848:
URL: 
https://github.com/apache/incubator-eventmesh/pull/2848#discussion_r1063885803


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/recommend/EventMeshRecommendImpl.java:
##########
@@ -226,15 +228,16 @@ private String recommendProxy(final Map<String, String> 
eventMeshMap,
             log.info("eventMeshMap:{},clientDistributionMap:{},group:{}", 
eventMeshMap, clientDistributionMap, group);
         }
 
-        if 
(!eventMeshMap.keySet().containsAll(clientDistributionMap.keySet())) {
+        Set<String> clientdDistributionSet=new 
HashSet<>(clientDistributionMap.keySet());
+        clientdDistributionSet.retainAll(eventMeshMap.keySet());
+        if(!clientdDistributionSet.isEmpty()){

Review Comment:
   The retainAll() method of java.util.Set interface is used to retain from 
this set all of its elements that are contained in the specified collection.
   I think the code logic is invalid.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to