[9] RFR of 8042377: BufferedWriter and FilteredOutputStream.close throw IAE if flush and close throw equal exceptions
Alan Bateman
Alan.Bateman at oracle.com
Fri Jun 26 07:52:35 UTC 2015
On 25/06/2015 18:58, Brian Burkhalter wrote:
> Hi Peter,
>
> Thanks for the code change suggestion. I have modified the patch to use its logic and to revert to the original boolean instance variable instead of the contentious AtomicBoolean:
>
> http://cr.openjdk.java.net/~bpb/8042377/webrev.02/
>
This looks okay too although your previous version meant that a flush
throwing ThreadDeath would cause close to terminate with the error
rather than it ending up as the suppressed exception. The new version is
better in that it ensures that close is always called and it's probably
not worth spending time on the ThreadDeath corner case here.
-Alan.
More information about the core-libs-dev
mailing list