Skip to content

Commit

Permalink
Fix: NPE while cleaning up namespace node (apache#4965)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhabalia authored Aug 18, 2019
1 parent 33441ea commit 41bc407
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private static final void cleanupSingleNamespaceNode(ZooKeeper zkc, String path,
String brokerUrl = null;
try {
byte[] data = zkc.getData(path, false, null);
if (data.length == 0) {
if (data == null || data.length == 0) {
// skip, ephemeral node will not have zero byte
return;
}
Expand Down

0 comments on commit 41bc407

Please sign in to comment.