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/21 03:58:12 UTC

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

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



##########
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:
       the newUrl could not be null, otherwise the function of doOverrideIfNecessary will be corrupted totally.




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