RFR 8080225 FileInput/OutputStream/FileChannel cleanup should be improved

Roger Riggs Roger.Riggs at oracle.com
Sat Dec 2 02:38:43 UTC 2017


Please review a revision to the work on remove a dependency on 
finalization from
FileInputStream, FileOutputStream, and add cleanup of closing file 
descriptors in FileChannel.

The previous version was too aggressive in removing the finalize method 
and was considered to be insufficiently
backward compatible.

For compatibility with previous versions, the close method will be 
called when the FIS/FOS is unreachable
only when FIS/FOS has been subclassed to override close() or 
finalize().  In other cases, the cleaner is used
to make sure the FileDescriptor is closed.

Webrev:
http://cr.openjdk.java.net/~rriggs/webrev-fis-cleanup-8080225/

Issue:
https://bugs.openjdk.java.net/browse/JDK-8080225

CSR:
Relax FileInputStream/FileOutputStream requirement to use finalize
https://bugs.openjdk.java.net/browse/JDK-8187325

Thanks, Roger






More information about the core-libs-dev mailing list