JDK-6541641 : (fc) java/nio/channels/FileChannel/ExpandingMap.java should clean up after itself
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2007-04-02
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
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.
JDK 7
7 b32Fixed
Related Reports
Relates :  
Description
ExpandingMap.java creates test files using File.createTempFile("exp", "tmp");.

It calls deleteOnExit() on them, however the files are still open and this
has no effect on Windows. (see product bugs 4171239, 4205562)

 $ pwd
/c/TEMP
 $ ls -l exp*tmp
-rwxrwxrwx  1 otto None 314874799 Apr  1 06:12 exp39413tmp
-rwxrwxrwx  1 otto None 314874799 Apr  2 05:16 exp63711tmp

Comments
EVALUATION The file channel needs to be closed, and the ref to the mapped buffers needs to be cleanup as well so the mapped buffered can get GCed and upmapped.
27-06-2008