RFR: 8336043: Add quality of implementation discussion to Object.{equals, toString, hashCode}
Chen Liang
liach at openjdk.org
Wed Jul 10 23:19:07 UTC 2024
On Wed, 10 Jul 2024 22:33:54 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> First pass at adding some quality of implementation discussions around the overridable methods of Object.
src/java.base/share/classes/java/lang/Object.java line 126:
> 124: *
> 125: * As as a quality of implementation concern, a particular
> 126: * implementation of this method may or may not support generating
"may not support generating hash codes" sounds weird; maybe like "may or may not guard against cyclic data structures in recursive hash code generation."
I think the key is "recursive" here, as only recursive implementations are at risk of these faults.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20128#discussion_r1673145220
More information about the core-libs-dev
mailing list