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

(fs) Typo in Path::normalize, empty path only returned if path does not have a root component

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • core-libs
    • b42
    • Verified

    Backports

      Description


        As noted here:
          http://mail.openjdk.java.net/pipermail/nio-dev/2014-November/002839.html

        there is a typo in Path::normalize.

        diff --git a/src/java.base/share/classes/java/nio/file/Path.java b/src/java.base/share/classes/java/nio/file/Path.java
        --- a/src/java.base/share/classes/java/nio/file/Path.java
        +++ b/src/java.base/share/classes/java/nio/file/Path.java
        @@ -325,7 +325,7 @@
              *
              * @return the resulting path or this path if it does not contain
              * redundant name elements; an empty path is returned if this path
        - * does have a root component and all name elements are redundant
        + * does not have a root component and all name elements are redundant
              *
              * @see #getParent
              * @see #toRealPath

        Attachments

          Issue Links

            Activity

              People

                alanb Alan Bateman
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: