Skip to content

Commit

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

Signed-off-by: Viraj Jasani <vjasani@apache.org>
  • Loading branch information
lujiefsi authored and virajjasani committed Dec 1, 2020
1 parent 5b49f36 commit e8f52d7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -476,7 +476,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 e8f52d7

Please sign in to comment.