Fix InputStream violation in DataBufferInputStream
This commit fixes an issue in DataBufferInputStream::mark, which before did not follow the contract defined by InputStream. Closes gh-29642
This commit is contained in:
@@ -77,8 +77,9 @@ final class DataBufferInputStream extends InputStream {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mark(int mark) {
|
||||
this.mark = mark;
|
||||
public void mark(int readLimit) {
|
||||
Assert.isTrue(readLimit > 0, "readLimit must be greater than 0");
|
||||
this.mark = this.dataBuffer.readPosition();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user