Polish DataBufferInputStream.skip()
See gh-34799 Signed-off-by: Johnny Lim <izeye@naver.com>
This commit is contained in:
parent
8f3ca49bc4
commit
e468a77276
|
@ -124,7 +124,7 @@ final class DataBufferInputStream extends InputStream {
|
|||
return 0L;
|
||||
}
|
||||
int skipped = Math.min(available(), n > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) n);
|
||||
this.dataBuffer.readPosition(Math.min(this.end, this.dataBuffer.readPosition() + skipped));
|
||||
this.dataBuffer.readPosition(this.dataBuffer.readPosition() + skipped);
|
||||
return skipped;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue