JDK-4634391 : java.text.CharSet doesn't respect contract for equals and hashCode
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.4.0,1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2002-02-07
  • Updated: 2003-10-06
  • Resolved: 2003-10-06
Related Reports
Duplicate :  
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.

java.text.CharSet 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

The hashCode() from java.lang.Object is used. The hashCode is same only for same references.

###@###.### 2002-10-30

Comments
EVALUATION CharSet.java will be removed from product code as a part of the fix for 4845385. Therefore, I close this bug as "will not fix". ###@###.### 2003-10-06
06-10-2003