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

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

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: