diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java index def3ccf39649..4456f975bd9e 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java @@ -371,7 +371,7 @@ public DataBuffer split(int index) { .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; }