JDK-4634400 : JDK code doesn't respect contract for equals and hashCode
  • Type: Enhancement
  • Component: xml
  • Sub-Component: javax.xml.transform
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2002-02-07
  • Updated: 2012-04-25
  • Resolved: 2007-01-27
Related Reports
Relates :  
Description
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