HBASE-25332:fix One pontential NPE

Closes #2715

Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
lujiefsi 2020-12-01 19:38:16 +05:30 committed by Viraj Jasani
parent 86bb037eb0
commit 8938b7a678
No known key found for this signature in database
GPG Key ID: B3D6C0B41C8ADFD5
1 changed files with 1 additions and 1 deletions

View File

@ -467,7 +467,7 @@ final class RSGroupInfoManagerImpl implements RSGroupInfoManager {
}
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);