[ 
https://issues.apache.org/jira/browse/HBASE-17859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15990409#comment-15990409
 ] 

Hudson commented on HBASE-17859:
--------------------------------

ABORTED: Integrated in Jenkins build HBase-HBASE-14614 #190 (See 
[https://builds.apache.org/job/HBase-HBASE-14614/190/])
HBASE-17859 ByteBufferUtils#compareTo is wrong (chia7712: rev 
73e1bcd33515061be2dc2e51e6ad19d9798a8ef6)
* (edit) 
hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestByteBufferUtils.java
* (edit) 
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java


> ByteBufferUtils#compareTo is wrong
> ----------------------------------
>
>                 Key: HBASE-17859
>                 URL: https://issues.apache.org/jira/browse/HBASE-17859
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: HBASE-17859.v0.patch, HBASE-17859.v1.patch
>
>
> buf2.get( i ) & 0xFF; -> buf2.get(j) & 0xFF;
> {noformat}
>   public static int compareTo(byte [] buf1, int o1, int l1, ByteBuffer buf2, 
> int o2, int l2) {
>    // ....
>     int end1 = o1 + l1;
>     int end2 = o2 + l2;
>     for (int i = o1, j = o2; i < end1 && j < end2; i++, j++) {
>       int a = buf1[i] & 0xFF;
>       int b = buf2.get(i) & 0xFF;
>       if (a != b) {
>         return a - b;
>       }
>     }
>     return l1 - l2;
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to