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

java.io.File.equals should ignore "." elements when comparing paths

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P3
    • Resolution: Won't Fix
    • 1.2.0
    • None
    • core-libs
    • None
    • generic
    • generic

    Description

      Seems like the following should be true, but are currently false:

      (new File("/a")).equals(new File("/a/."));
      (new File("/a/./foo.txt")).equals(new File("/a/foo.txt"))

      There are a couple of bugs outstanding against FilePermission that would
      be easier to fix if the above expressions returned true.

      Attachments

        Issue Links

          Activity

            People

              mr Mark Reinhold
              rschemersunw Roland Schemers (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: