United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6291034 FileCacheImageInputStream and FileCacheImageOutputStream should avoid File.deleteOnExit
JDK-6291034 : FileCacheImageInputStream and FileCacheImageOutputStream should avoid File.deleteOnExit

Details
Type:
Bug
Submit Date:
2005-06-27
Status:
Resolved
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2005-08-09
Component:
client-libs
OS:
solaris_8,generic
Sub-Component:
javax.imageio
CPU:
sparc,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0,1.4.2
Fixed Versions:

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

Sub Tasks

Description
Currently both the javax/imageio/stream/FileCacheImageInputStream and
javax/imageio/stream/FileCacheImageOutputStream classes use the File.deleteOnExit
functionality. There is a known bug with this method which is most noticeable
on servers running over a long period of time. (4513817)

A shutdown hook approach suggested by PDE should be used instead for these two classes.
###@###.### 2005-06-27 12:56:09 GMT

                                    

Comments
EVALUATION

The idea of fix for this problem was borrowed from the fixes for 6189812 and 6222850. The File.deleteOnExit() functionality can be replaced by our own shutdown hook that closes streams that are not closed before VM shutdown.
As part of stream closing procedure the cache files will be closed and deleted properly.
###@###.### 2005-07-21 13:14:07 GMT
                                     
2005-06-27



Hardware and Software, Engineered to Work Together