RFR: 8336043: Add quality of implementation discussion to Object.{equals, toString, hashCode}

Joe Darcy darcy at openjdk.org
Wed Jul 10 23:55:55 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 49:

> 47:  * particular, the implementations should take care to avoid using
> 48:  * excessive memory, computational time, or any other resources.
> 49:  * Additionally, during typical operation these methods should

A note on terminology, I used "typical" for the new notes rather than "normal" to avoid conflating the discussion with the JLS concept of code "completing normally" (as opposed to completing abruptly due to an exception):

https://docs.oracle.com/javase/specs/jls/se22/html/jls-14.html#jls-14.1

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20128#discussion_r1673207400


More information about the core-libs-dev mailing list