Skip to content

Commit c077805

Browse files
committed
Set correct capacity in DefaultDataBuffer::setNativeBuffer
Closes gh-30984
1 parent ceb7afd commit c077805

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public ByteBuffer getNativeBuffer() {
9494

9595
private void setNativeBuffer(ByteBuffer byteBuffer) {
9696
this.byteBuffer = byteBuffer;
97-
this.capacity = byteBuffer.remaining();
97+
this.capacity = byteBuffer.capacity();
9898
}
9999

100100

0 commit comments

Comments
 (0)