JDK-6291034 : FileCacheImageInputStream and FileCacheImageOutputStream should avoid File.deleteOnExit
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.imageio
  • Affected Version: 1.4.0,1.4.2
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_8
  • CPU: generic,sparc
  • Submitted: 2005-06-27
  • Updated: 2011-01-19
  • Resolved: 2005-08-09
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.
Other JDK 6
1.4.2_10Fixed 6 b47Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
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
27-06-2005