You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ar...@apache.org on 2021/03/27 17:59:34 UTC
[zookeeper] branch master updated: 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.
This is an automated email from the ASF dual-hosted git repository.
arshad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 4edbbea 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.
4edbbea is described below
commit 4edbbea5566925390b32702a97c17f7a76e32de5
Author: brentwritescode <br...@gmail.com>
AuthorDate: Sat Mar 27 23:30:11 2021 +0530
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 <br...@gmail.com>
Reviewers: Damien Diederen <dd...@crosstwine.com>, Mohammad Arshad <ar...@apache.org>
Closes #1601 from brentwritescode/ZOOKEEPER-4194
---
.../zookeeper/inspector/encryption/BasicDataEncryptionManager.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java b/zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java
index a9e5ac4..c8662db 100644
--- a/zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java
+++ b/zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java
@@ -30,6 +30,9 @@ public class BasicDataEncryptionManager implements DataEncryptionManager {
* (byte[])
*/
public String decryptData(byte[] encrypted) throws Exception {
+ if(encrypted == null) {
+ return "";
+ }
return new String(encrypted);
}