HBASE-16705 Eliminate long to Long auto boxing in LongComparator. (binlijin)

Conflicts:
	hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
This commit is contained in:
anoopsamjohn 2016-09-26 11:11:52 +05:30 committed by Andrew Purtell
parent 67a43c3059
commit a3485cc5ab
1 changed files with 10 additions and 10 deletions

View File

@ -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