Repository: aries-rsa
Updated Branches:
  refs/heads/master 19849747e -> 55ab0a11a


[ARIES-1774] Fix for NPE when a node has no children


Project: http://git-wip-us.apache.org/repos/asf/aries-rsa/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-rsa/commit/55ab0a11
Tree: http://git-wip-us.apache.org/repos/asf/aries-rsa/tree/55ab0a11
Diff: http://git-wip-us.apache.org/repos/asf/aries-rsa/diff/55ab0a11

Branch: refs/heads/master
Commit: 55ab0a11a8354cee7c0733439fc672acc0febf14
Parents: 1984974
Author: Christian Schneider <cschn...@adobe.com>
Authored: Thu Feb 8 17:43:10 2018 +0100
Committer: Christian Schneider <cschn...@adobe.com>
Committed: Thu Feb 8 17:43:10 2018 +0100

----------------------------------------------------------------------
 .../zookeeper/repository/ZookeeperEndpointRepository.java         | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/55ab0a11/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java
----------------------------------------------------------------------
diff --git 
a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java
 
b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java
index 6e2641f..e290e65 100644
--- 
a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java
+++ 
b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java
@@ -173,6 +173,9 @@ public class ZookeeperEndpointRepository implements 
Closeable, Watcher {
         handleZNodeChanged(path);
         try {
             List<String> children = zk.getChildren(path, this);
+            if (children == null) {
+                return;
+            }
             for (String child : children) {
                 String childPath = (path.endsWith("/") ? path : path + "/") + 
child;
                 watchRecursive(childPath);

Reply via email to