JDK-8189330 : Cleanup FileDescriptor implementation
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-10-14
  • Updated: 2018-03-28
  • Resolved: 2018-02-23
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 11
11 b03Fixed
Related Reports
Relates :  
Description
The Unix and Windows versions of FileDescriptor.java could be merged leaving only the native code FileDescriptor_md.c forks for the respective OS.

Additional cleanup might simplify the native code and remove the apparent overlap between FileDescriptor.close0 and FileDescriptor.cleanupClose0.
Note that sockets use the same method to avoid races to close when calling io_util_md.c:fileClose.

The FileDescriptor FDCleanup mechanism can be refactored to improve encapsulation and maintainability as suggested.

http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-February/051253.html