JDK-4634380 : JDK code doesn't respect contract for equals and hashCode
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:orb
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,solaris_8
  • CPU: generic,sparc
  • Submitted: 2002-02-07
  • Updated: 2004-01-19
  • Resolved: 2004-01-19
Related Reports
Duplicate :  
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.

com.sun.corba.se.internal.core.ORBVersionImpl redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.AlternateIIOPAddressComponent redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.CodeSetsComponent redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.GenericIdEncapsulation redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.IIOPAddressBase redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.IIOPProfile redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.JavaCodebaseComponent redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.ORBTypeComponent redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.ObjectId redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.ObjectKey redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.ObjectKeyTemplateBase redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.OldPOAObjectKeyTemplate redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.POAIdBase redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.POAObjectKeyTemplate redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.ior.WireObjectKeyTemplate redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.orbutil.RepIdDelegator redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.orbutil.RepIdDelegator_1_3 redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.orbutil.RepIdDelegator_1_3_1 redefines
  equals(Object) but not
  hashCode()
com.sun.corba.se.internal.core.GIOPVersion 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

Comments
EVALUATION Will review it in Tiger
11-06-2004