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

(fs) Awkward verbiage in description of Files.createTempFile(Path,String,String,FileAttribute)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 18
    • core-libs
    • b06
    • generic
    • generic

      The third paragraph of the documentation of java.nio.file.Files.createTempFile(Path,String,String,FileAttribute) is:

      "As with the File.createTempFile methods, this method is only part of a temporary-file facility. Where used as a work files, the resulting file may be opened using the DELETE_ON_CLOSE option so that the file is deleted when the appropriate close method is invoked. Alternatively, a shutdown-hook, or the File.deleteOnExit() mechanism may be used to delete the file automatically. "

      The first and second sentences are awkward and should be rephrased. In particular, the statement about "temporary-file facility" seems redundant, and "as a works file" incorrect.

            bpb Brian Burkhalter
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: