virajjasani commented on a change in pull request #688: HBASE-23119 ArrayIndexOutOfBoundsException in PrivateCellUtil#qualifi… URL: https://github.com/apache/hbase/pull/688#discussion_r331459035
########## File path: hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java ########## @@ -768,11 +768,13 @@ public static boolean qualifierStartsWith(final Cell left, final byte[] startsWi throw new IllegalArgumentException("Cannot pass an empty startsWith"); } if (left instanceof ByteBufferExtendedCell) { - return ByteBufferUtils.equals(((ByteBufferExtendedCell) left).getQualifierByteBuffer(), + return ((ByteBufferExtendedCell) left).getQualifierLength() >= startsWith.length Review comment: nit: cast is redundant here. `left.getQualifierLength() >= startsWith.length` should work ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services