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

JDK code doesn't respect contract for equals and hashCode

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.4.1
    • xml

      The following problem was originally reported in 4634068.

      There are a number of classes that do not respect the
      implied contract for equals and hashCode. See, for example,
      Joshua Bloch's book "Effective Java", items 7-8.

      org.apache.xpath.objects.XObject defines
        equals(org.apache.xpath.objects.XObject) but doesn't redefine
        equals(Object)
      org.apache.xpath.Arg redefines
        equals(Object) but not
        hashCode()
      org.apache.xalan.transformer.StackGuard redefines
        equals(Object) but not
        hashCode()
      org.apache.xml.utils.URI redefines
        equals(Object) but not
        hashCode()
      org.apache.xml.dtm.ref.DTMNodeProxy redefines
        equals(Object) but not
        hashCode()

      Problems found by applying automatic tools to JDK
      libraries. However, manual inspectation of the classes
      reveals the same problems.

      -- iag@sfbay 2002-02-06
      ###@###.### 11/2/04 21:58 GMT

            jsuttorsunw Jeff Suttor (Inactive)
            iris Iris Clark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: