HBASE-19484 (addendum) NPE in ExtendedCell#write

This commit is contained in:
Chia-Ping Tsai 2017-12-13 22:31:04 +08:00
parent d28e126b29
commit eebff56fe6
1 changed files with 4 additions and 2 deletions

View File

@ -53,8 +53,10 @@ public interface ExtendedCell extends RawCell, HeapSize, Cloneable {
// Key
PrivateCellUtil.writeFlatKey(this, out);
// Value
out.write(getValueArray(), getValueOffset(), getValueLength());
if (getValueLength() > 0) {
// Value
out.write(getValueArray(), getValueOffset(), getValueLength());
}
// Tags length and tags byte array
if (withTags && getTagsLength() > 0) {