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:45:16 +05:30 committed by Viraj Jasani
parent 4c8fa47b28
commit a1db679e4d
No known key found for this signature in database
GPG Key ID: B3D6C0B41C8ADFD5
1 changed files with 1 additions and 1 deletions

View File

@ -503,7 +503,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);