HDFS-16370. Fix assert message for BlockInfo (#3747). Contributed by tomscut.

Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
litao 2021-12-05 01:24:44 +08:00 committed by GitHub
parent 2f55a6cced
commit c2afb6a00b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 17 deletions

View File

@ -136,7 +136,7 @@ public abstract class BlockInfo extends Block
BlockInfo info = (BlockInfo)triplets[index * 3 + 1]; BlockInfo info = (BlockInfo)triplets[index * 3 + 1];
assert info == null || assert info == null ||
info.getClass().getName().startsWith(BlockInfo.class.getName()) : info.getClass().getName().startsWith(BlockInfo.class.getName()) :
"BlockInfo is expected at " + index*3; "BlockInfo is expected at " + (index * 3 + 1);
return info; return info;
} }
@ -146,7 +146,7 @@ public abstract class BlockInfo extends Block
BlockInfo info = (BlockInfo)triplets[index * 3 + 2]; BlockInfo info = (BlockInfo)triplets[index * 3 + 2];
assert info == null || info.getClass().getName().startsWith( assert info == null || info.getClass().getName().startsWith(
BlockInfo.class.getName()) : BlockInfo.class.getName()) :
"BlockInfo is expected at " + index*3; "BlockInfo is expected at " + (index * 3 + 2);
return info; return info;
} }