[9] RFR of 8042377: BufferedWriter and FilteredOutputStream.close throw IAE if flush and close throw equal exceptions

Bernd Eckenfels ecki at zusammenkunft.net
Wed Jun 24 21:48:07 UTC 2015


Am Wed, 24 Jun 2015 12:04:58 -0700
schrieb Brian Burkhalter <brian.burkhalter at oracle.com>:

> Please review at your convenience.
> 
> Issue:	https://bugs.openjdk.java.net/browse/JDK-8042377
> Patch:	http://cr.openjdk.java.net/~bpb/8042377/webrev.00/
> 
> The use of try-with-resources in FilteredOutputStream.close() is
> replaced with explicit handling of IOExceptions potentially thrown by
> flush() or close(). A test covering all cases is added.

I cannot speak about using AtomicBoolean in such basic classes, but I
generally would have done the same as I think that concurrent close()
is something which is not unlikely even for otherwise not thread safe
streams.

Gruss
Bernd



More information about the core-libs-dev mailing list