This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 6b095f1c68 Fix npe (#10457)
6b095f1c68 is described below

commit 6b095f1c68b546c9f0ce72dd91b9c1d2792c60be
Author: 灼华 <[email protected]>
AuthorDate: Mon Aug 15 09:45:35 2022 +0800

    Fix npe (#10457)
---
 .../configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java
 
b/dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java
index b427709dc8..17daabb7b6 100644
--- 
a/dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java
+++ 
b/dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java
@@ -146,7 +146,7 @@ public class ZookeeperDynamicConfiguration extends 
TreePathDynamicConfiguration
     @Override
     protected void doRemoveListener(String pathKey, ConfigurationListener 
listener) {
         ZookeeperDataListener zookeeperDataListener = 
cacheListener.removeListener(pathKey, listener);
-        if (CollectionUtils.isEmpty(zookeeperDataListener.getListeners())) {
+        if (zookeeperDataListener != null && 
CollectionUtils.isEmpty(zookeeperDataListener.getListeners())) {
             zkClient.removeDataListener(pathKey, zookeeperDataListener);
         }
     }

Reply via email to