HBASE-18692 [compat 1-2] ByteBufferUtils.copyFromBufferToBuffer goes from void to int
This commit is contained in:
parent
bbf23d9627
commit
a2b110e0fa
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue