A DESCRIPTION OF THE PROBLEM :
It would seem logical that the documentation for Object.hashCode() would refer to System.identityHashCode(), since they proportedly generate the same value, given the same object.
Therefore I propose adding a "see also" reference in the API documentation for java.lang.Object that references System.identityHashCode().
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
...
@see java.lang.System#identityHashCode(Object)
ACTUAL -
...
(@see clause omitted)
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()
###@###.### 2005-03-11 00:31:17 GMT
It would seem logical that the documentation for Object.hashCode() would refer to System.identityHashCode(), since they proportedly generate the same value, given the same object.
Therefore I propose adding a "see also" reference in the API documentation for java.lang.Object that references System.identityHashCode().
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
...
@see java.lang.System#identityHashCode(Object)
ACTUAL -
...
(@see clause omitted)
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()
###@###.### 2005-03-11 00:31:17 GMT
- relates to
-
JDK-4674089 Explain how Object.equals() approximates an equivalence relation
-
- Closed
-