Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8183344

Better cleanup for jdk/test/java/io/File/createTempFile/SpecialTempFile.java

XMLWordPrintable

    • b17
    • generic
    • generic

      SpecialTempFile.java creates 'SpecialTempFile' in the default temp directory:

      cat -n jdk/test/java/io/File/createTempFile/SpecialTempFile.java

          83 final String name = "SpecialTempFile";
          84 File f = new File(System.getProperty("java.io.tmpdir"), name);
          85 if (!f.exists()) {
          86 f.createNewFile();
          87 }

      This file is not cleaned up later.

      The preferred approach would be to create temporary test directories and files under the jtreg property user.dir instead, if it is defined.

            bpb Brian Burkhalter
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: