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

URL.equals() is not symmetric in checking references

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5

      Description

      If a URL has a reference part, URL.equals(target) now checks that target also
      has the same reference part. However, if this URL does not have a reference
      part, then the reference of the target is not checked. Consequently,

              URL u1 = new URL("http://java.sun.com/index.html");
              URL u2 = new URL("http://java.sun.com/index.html#_TOP_");

      u1.equals(u2) is true, but u2.equals(u1) is false.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mmcclosksunw Michael Mccloskey (Inactive)
              Reporter:
              rleesunw Rosanna Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: