8078891: java.io.SequenceInputStream.close is not atomic and not idempotent
pavel.rappo at oracle.com
Thu Jul 25 19:43:43 UTC 2019
Thanks a lot for picking up a bug I filled back in 2015. This looks like a good
I'm a bit concerned though with the added `finally` block in L98. Could that
lead to a subtle behavioral change for (an unlikely) case where a `read` method
exhausts the current stream, then tries to close it, fails (`close` throws
IOException) and then jumps over to the next stream instead of staying on the
Previously, `read` would be tripping over a closed stream forever.
Theoretically speaking, we might have a case of a "non-sticky" error in the
InputStream. Try to read, fail, try to read again -- you might get lucky.
> On 24 Jul 2019, at 01:09, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> Ensure that SequenceInputStream closes all component streams.
More information about the core-libs-dev