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

(fs) Typo in Files.isSameFile() javadoc

XMLWordPrintable

    • b23
    • x86
    • windows_7
    • Verified

      A DESCRIPTION OF THE PROBLEM :
      The documentation for java.nio.file.Files.isSameFile() says this:

      It is transitive: for three Paths f, g, and h, if isSameFile(f,g) returns true and isSameFile(g,h) returns true, then isSameFile(g,h) will return return true.

      I believe it should say this:

      It is transitive: for three Paths f, g, and h, if isSameFile(f,g) returns true and isSameFile(g,h) returns true, then isSameFile(f,h) will return return true.

      That is, the last "isSameFile(g,h)" should be "isSameFile(f,h)".

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      It is transitive: for three Paths f, g, and h, if isSameFile(f,g) returns true and isSameFile(g,h) returns true, then isSameFile(f,h) will return return true.
      ACTUAL -
      It is transitive: for three Paths f, g, and h, if isSameFile(f,g) returns true and isSameFile(g,h) returns true, then isSameFile(g,h) will return return true.

      URL OF FAULTY DOCUMENTATION :
      http://download.java.net/jdk7/docs/api/java/nio/file/Files.html#isSameFile(java.nio.file.Path, java.nio.file.Path)

            alanb Alan Bateman
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: