JDK-8193090 : Release Note: Relax FileInputStream/FileOutputStream Requirement for finalize to Call close
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 10
  • Priority: P3
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2017-12-05
  • Updated: 2019-05-07
  • Resolved: 2018-01-24
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 10
10Resolved
Description
The specifications of `FileInputStream` and `FileOutputStream` are changed to require calling the `close` method when "there are no more references to the stream" only in the case where it would affect a subclass that has overridden the `close` method. The stream's `finalize` method does not call `close` directly in this case. In other cases, the release of resources is implementation specific. Refer to the `FileInputStream` and `FileOutputStream` documentation for recommendations.