hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject [45/50] hbase git commit: Amend HBASE-16705 Eliminate long to Long auto boxing in LongComparator. (binlijin)
Date Tue, 01 Nov 2016 19:48:23 GMT
Amend HBASE-16705 Eliminate long to Long auto boxing in LongComparator. (binlijin)

JDK 6 compatibility fix


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

Branch: refs/heads/0.98
Commit: 44c724b56dc1431209f561cb997fce805f9f45f9
Parents: 6b9bdd6
Author: Andrew Purtell <apurtell@apache.org>
Authored: Wed Oct 5 00:44:51 2016 +0000
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed Oct 5 00:45:52 2016 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/filter/LongComparator.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/44c724b5/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
index 3e96b01..eeb0a56 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
@@ -25,6 +25,7 @@ import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
 import org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos;
 import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.LongUtils;
 
 /**
  * A long comparator which numerical compares against the specified byte array
@@ -42,7 +43,7 @@ public class LongComparator extends ByteArrayComparable {
   @Override
   public int compareTo(byte[] value, int offset, int length) {
     long that = Bytes.toLong(value, offset, length);
-    return Long.compare(longValue, that);
+    return LongUtils.compare(longValue, that);
   }
 
     /**


Mime
View raw message