HBASE-18692 [compat 1-2] ByteBufferUtils.copyFromBufferToBuffer goes from void to int

This commit is contained in:
Michael Stack 2017-08-27 22:22:12 -07:00
parent bbf23d9627
commit a2b110e0fa
1 changed files with 2 additions and 2 deletions

View File

@ -395,7 +395,7 @@ public final class ByteBufferUtils {
* @param destinationOffset
* @param length
*/
public static int copyFromBufferToBuffer(ByteBuffer in, ByteBuffer out, int sourceOffset,
public static void copyFromBufferToBuffer(ByteBuffer in, ByteBuffer out, int sourceOffset,
int destinationOffset, int length) {
if (in.hasArray() && out.hasArray()) {
System.arraycopy(in.array(), sourceOffset + in.arrayOffset(), out.array(), out.arrayOffset()
@ -409,7 +409,7 @@ public final class ByteBufferUtils {
inDup.position(sourceOffset).limit(sourceOffset + length);
outDup.put(inDup);
}
return destinationOffset + length;
// We used to return a result but disabled; return destinationOffset + length;
}
/**