Throw UOE from compressible bytes stream reset

A compressible bytes output stream is a stream output which supports a
reset method. However, compressible bytes output streams are unusual in
that the current implementation sometimes supports a reset (if the
stream is not compressed) and sometimes does not support a rest (if the
stream is compressed). This inconsistent behavior is puzzling and
instead we should simply always throw an unsupported operation
exception.

Relates #27564
This commit is contained in:
Jason Tedor 2017-11-28 11:29:47 -05:00 committed by GitHub
parent 37653c9dca
commit cefb46d0fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -104,6 +104,6 @@ final class CompressibleBytesOutputStream extends StreamOutput {
@Override
public void reset() throws IOException {
stream.reset();
throw new UnsupportedOperationException();
}
}