You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/18 01:57:10 UTC

[GitHub] [dubbo] changfubai commented on a change in pull request #8837: [master] fix NPE in doOverrideIfNecessary

changfubai commented on a change in pull request #8837:
URL: https://github.com/apache/dubbo/pull/8837#discussion_r711423103



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -700,7 +700,7 @@ public synchronized void doOverrideIfNecessary() {
             newUrl = getConfiguredInvokerUrl(providerConfigurationListener.getConfigurators(), newUrl);
             newUrl = getConfiguredInvokerUrl(serviceConfigurationListeners.get(originUrl.getServiceKey())
                     .getConfigurators(), newUrl);
-            if (!currentUrl.equals(newUrl)) {
+            if (!newUrl.equals(currentUrl)) {

Review comment:
       感觉可以抽一个工具类出来,判断两个url是否相同,这样就不用关注谁在前面谁在后面了




-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org