Skip to content

Commit

Permalink
HBASE-25332:fix One pontential NPE
Browse files Browse the repository at this point in the history
Closes #2715

Signed-off-by: Viraj Jasani <vjasani@apache.org>
  • Loading branch information
lujiefsi authored and virajjasani committed Dec 1, 2020
1 parent 4c8fa47 commit a1db679
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -503,7 +503,7 @@ List<RSGroupInfo> retrieveGroupListFromZookeeper() throws IOException {
}
for (String znode : children) {
byte[] data = ZKUtil.getData(watcher, ZNodePaths.joinZNode(groupBasePath, znode));
if (data.length > 0) {
if (data != null && data.length > 0) {
ProtobufUtil.expectPBMagicPrefix(data);
ByteArrayInputStream bis =
new ByteArrayInputStream(data, ProtobufUtil.lengthOfPBMagic(), data.length);
Expand Down

0 comments on commit a1db679

Please sign in to comment.