JDK-8183341 : Better cleanup for javax/imageio/AllowSearch.java
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.imageio
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-07-01
  • Updated: 2020-10-12
  • Resolved: 2017-07-24
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 10 JDK 8 Other
10 b23Fixed 8u270Fixed openjdk8u272Fixed
Description
AllowSearch.java creates an imageio*.tmp file in the default temp directory, but does not clean it up later.

cat -n jdk/test/javax/imageio/AllowSearch.java
   [...]
    49          File f = File.createTempFile("imageio", ".tmp");

A better approach would be to create temporary test files under the jtreg property user.dir instead, if it is defined.

During a jtreg run, user.dir has the value $PWD/JTwork/scratch

Comments
8u Fix Request: I would like to backport this patch to 8u for Oracle 8u271 parity. The original patch applies cleanly after JDK-8177628 backport.
19-06-2020

Reproduced the issue on JDK10 and found the fix for it. Currently undergoing testing the fix.
11-07-2017