Skip to content

Commit 4edbbea

Browse files
brentwritescodearshadmohammad
authored andcommitted
ZOOKEEPER-4194: ZooInspector throws NullPointerExceptions to console when node data is null
This is a very minor fix to a NullPointerException present in the ZooInspector utility which prevents a NullPointerException getting thrown when ZooInspector inspects an empty node. Author: brentwritescode <[email protected]> Reviewers: Damien Diederen <[email protected]>, Mohammad Arshad <[email protected]> Closes apache#1601 from brentwritescode/ZOOKEEPER-4194
1 parent de726d0 commit 4edbbea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public class BasicDataEncryptionManager implements DataEncryptionManager {
3030
* (byte[])
3131
*/
3232
public String decryptData(byte[] encrypted) throws Exception {
33+
if(encrypted == null) {
34+
return "";
35+
}
3336
return new String(encrypted);
3437
}
3538

0 commit comments

Comments
 (0)