Skip to content

Commit 722333f

Browse files
izeyebclozel
authored andcommitted
Polish DataBufferInputStream.skip()
See gh-34799 Closes gh-35030 Signed-off-by: Johnny Lim <[email protected]>
1 parent 26ae3ed commit 722333f

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/DataBufferInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public long skip(long n) throws IOException {
124124
return 0L;
125125
}
126126
int skipped = Math.min(available(), n > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) n);
127-
this.dataBuffer.readPosition(Math.min(this.end, this.dataBuffer.readPosition() + skipped));
127+
this.dataBuffer.readPosition(this.dataBuffer.readPosition() + skipped);
128128
return skipped;
129129
}
130130

0 commit comments

Comments
 (0)