JDK-8137007 : Backport Request : 8054565
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 8u60
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • OS: linux
  • CPU: x86
  • Submitted: 2015-09-16
  • Updated: 2017-02-23
Related Reports
Relates :  
Description
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.


Comments
Moving across to dev team for evaluation.
23-09-2015