8078891: java.io.SequenceInputStream.close is not atomic and not idempotent

Daniel Fuchs daniel.fuchs at oracle.com
Fri Jul 26 16:20:44 UTC 2019


On 26/07/2019 17:41, Brian Burkhalter wrote:
> Please see the updated patch which switches the implementation to the amended version and incorporates the proposed change to the test:
> 
> http://cr.openjdk.java.net/~bpb/8078891/webrev.01/

That looks good to me Brian.

I had a look at the API documentation of AutoCloseable::close()
Though the further behavior of the closed object when close throws
an exception is a bit fuzzy - your amended implementation has greater
compatibility with preexisting behavior of SequenceInputStream, and
is in line with what one would expect by reading AutoCloseable::close().

Thanks Pavel for suggesting this!

best regards,

-- daniel

> 
> Thanks,
> 
> Brian



More information about the core-libs-dev mailing list