8199394: Object.hashCode should not mention anything about memory addresses
Reviewed-by: shade, forax, adinn, rriggs
--- a/src/java.base/share/classes/java/lang/Object.java Tue Dec 11 12:45:38 2018 -0800
+++ b/src/java.base/share/classes/java/lang/Object.java Tue Dec 11 13:10:14 2018 -0800
@@ -94,12 +94,10 @@
* 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)