8286559: Re-examine synchronization of mark and reset methods on InflaterInputStream

Reviewed-by: lancea, alanb, bpb
This commit is contained in:
Jaikiran Pai 2022-05-14 03:21:01 +00:00
parent f56396f168
commit e4378ab28d

View File

@ -264,21 +264,22 @@ public class InflaterInputStream extends FilterInputStream {
/** /**
* Marks the current position in this input stream. * Marks the current position in this input stream.
* *
* <p> The {@code mark} method of {@code InflaterInputStream} * @implSpec The {@code mark} method of {@code InflaterInputStream}
* does nothing. * does nothing.
* *
* @param readlimit the maximum limit of bytes that can be read before * @param readlimit the maximum limit of bytes that can be read before
* the mark position becomes invalid. * the mark position becomes invalid.
* @see java.io.InputStream#reset() * @see java.io.InputStream#reset()
*/ */
public synchronized void mark(int readlimit) { @Override
public void mark(int readlimit) {
} }
/** /**
* Repositions this stream to the position at the time the * Repositions this stream to the position at the time the
* {@code mark} method was last called on this input stream. * {@code mark} method was last called on this input stream.
* *
* <p> The method {@code reset} for class * @implSpec The method {@code reset} for class
* {@code InflaterInputStream} does nothing except throw an * {@code InflaterInputStream} does nothing except throw an
* {@code IOException}. * {@code IOException}.
* *
@ -286,7 +287,8 @@ public class InflaterInputStream extends FilterInputStream {
* @see java.io.InputStream#mark(int) * @see java.io.InputStream#mark(int)
* @see java.io.IOException * @see java.io.IOException
*/ */
public synchronized void reset() throws IOException { @Override
public void reset() throws IOException {
throw new IOException("mark/reset not supported"); throw new IOException("mark/reset not supported");
} }
} }