AlbumenJ commented on a change in pull request #9580:
URL: https://github.com/apache/dubbo/pull/9580#discussion_r800124949



##########
File path: 
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java
##########
@@ -135,18 +134,16 @@ public synchronized void 
onEvent(ServiceInstancesChangedEvent event) {
 
             localServiceToRevisions.forEach((serviceKey, revisions) -> {
                 List<URL> urls = revisionsToUrls.get(revisions);
-                if (urls != null) {
-                    tmpServiceUrls.put(serviceKey, urls);
-                } else {
+                if (urls == null) {
                     urls = new ArrayList<>();
                     for (String r : revisions) {
                         for (ServiceInstance i : revisionToInstances.get(r)) {
                             urls.add(i.toURL());
                         }
                     }
                     revisionsToUrls.put(revisions, urls);
-                    tmpServiceUrls.put(serviceKey, urls);

Review comment:
       Maybe no changes are seriously needed here?




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