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



##########
File path: 
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       one report of github say NPE occurred at here:
   ```
   2021-09-04T18:15:20.5853500Z java.lang.NullPointerException
   2021-09-04T18:15:20.5855218Z at 
org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:691)
   2021-09-04T18:15:20.5857572Z at 
org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.notify(RegistryProtocol.java:672)
   2021-09-04T18:15:20.5859640Z at 
org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:429)
   2021-09-04T18:15:20.5861641Z at 
org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:372)
   2021-09-04T18:15:20.5863623Z at 
org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
   2021-09-04T18:15:20.5865836Z at 
org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:181)
   2021-09-04T18:15:20.5868092Z at 
org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
   2021-09-04T18:15:20.5870274Z at 
org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
   2021-09-04T18:15:20.5872504Z at 
org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:232)
   2021-09-04T18:15:20.5874770Z at 
org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
   2021-09-04T18:15:20.5877025Z at 
org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:73)
   2021-09-04T18:15:20.5878629Z at 
org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
   2021-09-04T18:15:20.5880268Z at 
org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:518)
   2021-09-04T18:15:20.5882154Z at 
org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:339)
   2021-09-04T18:15:20.5883655Z at 
org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:314)
   2021-09-04T18:15:20.5885108Z at 
org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:238)
   2021-09-04T18:15:20.5886991Z at 
org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:135)
   ```
   at org.apache.dubbo.config.ReferenceConfigTest testReferenceRetry():
   ```
           try {
               System.setProperty("java.net.preferIPv4Stack", "true");
               sc.export();  <=== throw NPE here
               demoService = rc.get();
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           } 
   ```
   ReferenceConfigTest.java version: 
https://github.com/zrlw/dubbo/commit/dee73739695b0882b099ad0d6c595a4f867933ba#diff-a3037d1b17666ec81a82a602dbae49a1c56c744fd1e88f07f7106f91a6b00988




-- 
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-unsubscr...@dubbo.apache.org

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



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

Reply via email to