A DESCRIPTION OF THE REQUEST :
See http://bugs.java.com/view_bug.do?bug_id=8054565
This bug is not fixed in 8u, and no plans were made to fix it there. See http://marc.info/?t=141767408700004&r=1&w=2 thread for fix discussion.
JUSTIFICATION :
Backporting this bug to Java 8 would alleviate problems with multiple close() calls that are used in at least one popular library - Apache PdfBox used in conjunction with Oracle JDBC driver. This is probably an edge case, but has been reported elsewhere as well.
See - http://pdfbox-users.markmail.org/message/ld5x7mrb64pilgqb. Asking this team to workaround the bug seems non-ideal.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expect the patched Java 9 behavior, and the fulfilled contract of Closable.
ACTUAL -
Calling close on an already closed resource should do nothing per the Closable contract.
---------- BEGIN SOURCE ----------
See http://bugs.java.com/view_bug.do?bug_id=8054565
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Override close(). Not always reasonable if you don't own the library.
See http://bugs.java.com/view_bug.do?bug_id=8054565
This bug is not fixed in 8u, and no plans were made to fix it there. See http://marc.info/?t=141767408700004&r=1&w=2 thread for fix discussion.
JUSTIFICATION :
Backporting this bug to Java 8 would alleviate problems with multiple close() calls that are used in at least one popular library - Apache PdfBox used in conjunction with Oracle JDBC driver. This is probably an edge case, but has been reported elsewhere as well.
See - http://pdfbox-users.markmail.org/message/ld5x7mrb64pilgqb. Asking this team to workaround the bug seems non-ideal.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expect the patched Java 9 behavior, and the fulfilled contract of Closable.
ACTUAL -
Calling close on an already closed resource should do nothing per the Closable contract.
---------- BEGIN SOURCE ----------
See http://bugs.java.com/view_bug.do?bug_id=8054565
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Override close(). Not always reasonable if you don't own the library.
- duplicates
-
JDK-8054565 FilterOutputStream.close may throw IOException if called twice and underlying flush or close fails
- Closed
- relates to
-
JDK-8054565 FilterOutputStream.close may throw IOException if called twice and underlying flush or close fails
- Closed