Correctly set capacity of remainder in DefaultDataBuffer::split
This commit ensures that the capacity of the remainder buffer after a split operation is set directly on the field. Calling capacity(int) caused a new buffer to be allocated. Closes gh-31848
This commit is contained in:
parent
22bf4df290
commit
1ff683b259
|
|
@ -371,7 +371,7 @@ public class DefaultDataBuffer implements DataBuffer {
|
|||
.slice();
|
||||
this.writePosition = Math.max(this.writePosition, index) - index;
|
||||
this.readPosition = Math.max(this.readPosition, index) - index;
|
||||
capacity(this.byteBuffer.capacity());
|
||||
this.capacity = this.byteBuffer.capacity();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue