JDK-8042377 : BufferedWriter and FilteredOutputStream.close throw IAE if flush and close throw equal exceptions
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-05-05
  • Updated: 2016-08-26
  • Resolved: 2015-06-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b72Fixed
Related Reports
Relates :  
Relates :  
Description
The changes in JDK-7015589 to use try-with-resources didn't account of writer or output stream implementations that cache the IOException in a way that results in flush and close throwing equal exceptions. The result is that close can throw IllegalAccessException when it attempts to add the suppressed exception.

This bug is reported on core-libs-dev here:
  http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-May/026724.html
Comments
Review thread: http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-June/034275.html
24-06-2015