From a3485cc5ab42cf20f1edd53f1d235d2be3038a80 Mon Sep 17 00:00:00 2001 From: anoopsamjohn Date: Mon, 26 Sep 2016 11:11:52 +0530 Subject: [PATCH] HBASE-16705 Eliminate long to Long auto boxing in LongComparator. (binlijin) Conflicts: hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java --- .../hadoop/hbase/filter/LongComparator.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 947c9da9adf..57e63de6da0 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 @@ -32,18 +32,18 @@ import org.apache.hadoop.hbase.util.Bytes; @InterfaceAudience.Public @InterfaceStability.Stable public class LongComparator extends ByteArrayComparable { - private Long longValue; + private long longValue; - public LongComparator(long value) { - super(Bytes.toBytes(value)); - this.longValue = value; - } + public LongComparator(long value) { + super(Bytes.toBytes(value)); + this.longValue = value; + } - @Override - public int compareTo(byte[] value, int offset, int length) { - Long that = Bytes.toLong(value, offset, length); - return this.longValue.compareTo(that); - } + @Override + public int compareTo(byte[] value, int offset, int length) { + long that = Bytes.toLong(value, offset, length); + return Long.compare(longValue, that); + } /** * @return The comparator serialized using pb