8199394: Object.hashCode should not mention anything about memory addresses
Reviewed-by: shade, forax, adinn, rriggs
This commit is contained in:
parent
019bd7cf2b
commit
7cea6f6ac2
@ -94,12 +94,10 @@ public class Object {
|
||||
* programmer should be aware that producing distinct integer results
|
||||
* for unequal objects may improve the performance of hash tables.
|
||||
* </ul>
|
||||
* <p>
|
||||
* As much as is reasonably practical, the hashCode method defined
|
||||
* by class {@code Object} does return distinct integers for
|
||||
* distinct objects. (The hashCode may or may not be implemented
|
||||
* as some function of an object's memory address at some point
|
||||
* in time.)
|
||||
*
|
||||
* @implSpec
|
||||
* As far as is reasonably practical, the {@code hashCode} method defined
|
||||
* by class {@code Object} returns distinct integers for distinct objects.
|
||||
*
|
||||
* @return a hash code value for this object.
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
|
Loading…
Reference in New Issue
Block a user