From 634f63ef3c14adf3758dc1de0be83fb55350e7e1 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Tue, 21 May 2013 01:59:44 +0000 Subject: [PATCH] HBASE-8582 Possible NullPointerException in ZKInterProcessLockBase#visitLocks (Ted Yu) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1484643 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop/hbase/zookeeper/lock/ZKInterProcessLockBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/lock/ZKInterProcessLockBase.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/lock/ZKInterProcessLockBase.java index 5a0fa641dda..d06800ccd79 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/lock/ZKInterProcessLockBase.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/lock/ZKInterProcessLockBase.java @@ -423,7 +423,7 @@ public abstract class ZKInterProcessLockBase implements InterProcessLock { LOG.error("Unexpected ZooKeeper error when listing children", e); throw new IOException("Unexpected ZooKeeper exception", e); } - if (children.size() > 0) { + if (children != null && children.size() > 0) { for (String child : children) { if (isChildOfSameType(child)) { String znode = ZKUtil.joinZNode(parentLockNode, child);