hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chia7...@apache.org
Subject hbase git commit: HBASE-19484 (addendum) NPE in ExtendedCell#write
Date Wed, 13 Dec 2017 18:42:04 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 fb6625fdd -> d2ffd5d7e


HBASE-19484 (addendum) NPE in ExtendedCell#write


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d2ffd5d7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d2ffd5d7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d2ffd5d7

Branch: refs/heads/branch-2
Commit: d2ffd5d7ed3f7638525d325f0d7e97d650e1e715
Parents: fb6625f
Author: Chia-Ping Tsai <chia7712@gmail.com>
Authored: Wed Dec 13 22:31:04 2017 +0800
Committer: Chia-Ping Tsai <chia7712@gmail.com>
Committed: Thu Dec 14 02:32:28 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ExtendedCell.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d2ffd5d7/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
index d491326..36b07a8 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
@@ -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) {


Mime
View raw message