United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7105952 Improve finalisation for FileInputStream/FileOutputStream/RandomAccessFile
7105952 : Improve finalisation for FileInputStream/FileOutputStream/RandomAccessFile

Details
Type:
Bug
Submit Date:
2011-10-28
Status:
Closed
Updated Date:
2012-05-09
Project Name:
JDK
Resolved Date:
2012-05-09
Component:
core-libs
OS:
generic
Sub-Component:
java.io
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6-pool,7,8
Fixed Versions:
8

Related Reports
Backport:
Backport:
Duplicate:
Duplicate:
Relates:
Relates:
Relates:

Sub Tasks

Description
Finalisation for FileInputStream/FileOutputStream/RandomAccessFile streams that share the same native FileDescritor needs improvement. Currently a counter is used to keep track of streams which reference the same native FD. A close() on one of the streams means other streams are not properly notified of the event.

Best approach is to modify fileDescriptor so that FileInputStream/FileOutputStream/RandomAccessFile classes can register with them and ensure streams are correctly closed out at close() time or when finalizer gets to run.

                                    

Comments
EVALUATION

modify FileDesriptor so that it keeps track of all its parents/referents and takes appropritate measures at close time.
                                     
2011-10-28



Hardware and Software, Engineered to Work Together