URL.equals() is not symmetric in checking references

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.1
    • Component/s: core-libs
    • None
    • sparc
    • solaris_2.5

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: