code review request : 7105952: Improve finalisation for FileInputStream/FileOutputStream/RandomAccessFile

Seán Coffey sean.coffey at
Fri Oct 28 18:13:24 UTC 2011

This is a second stab at cleaning up the close() and finalize() methods 
for  FileInputStream / FileOutputStream / RandomAccessFile classes so 
that all parents/referents sharing the same native FileDescriptor are 
closed out correctly.

With Alan's assistance, we have a better implementation in place where 
we avoid the use of counters and instead cycle through a list of shared 
closeables when a FileDescriptor is being shared.

Bug report (not visible yet)

webrev :


More information about the core-libs-dev mailing list