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 86bb037 commit 8938b7a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -467,7 +467,7 @@ private 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 8938b7a

Please sign in to comment.