[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/23727] New: Proxy.Proxy#hashCode() can return different v
From: |
ujihara at aurora dot dti dot ne dot jp |
Subject: |
[Bug classpath/23727] New: Proxy.Proxy#hashCode() can return different value when a.equals(b) |
Date: |
4 Sep 2005 22:42:39 -0000 |
java.lang.reflect.Proxy$ProxyType#hashCode() can return non-unique value even if
objects equals each other, ie, when a.equals(b) is true, a.hashCode() cann't
equal b.hashCode().
The reason is hashCode() method is order-sensitive against interfaces field, but
equals(Object) method is not. I think equals(Object) method be modified rather
than hashCode() method because it is expensive to recognize the real sameness
between two interfaces and it isn't wrong thing to use simple equals method.
--
Summary: Proxy.Proxy#hashCode() can return different value when
a.equals(b)
Product: classpath
Version: 0.17
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ujihara at aurora dot dti dot ne dot jp
CC: bug-classpath at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23727
- [Bug classpath/23727] New: Proxy.Proxy#hashCode() can return different value when a.equals(b),
ujihara at aurora dot dti dot ne dot jp <=