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

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

    Details

    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: