On Wed, 10 Jul 2024 22:33:54 GMT, Joe Darcy <da...@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 48: > 46: * to provide reasonable implementations of these methods. In > 47: * particular, the implementations should take care to avoid using > 48: * excessive memory, computational time, or any other resources. While it's not wrong, advising against "excessive" usage is so vague as not to be actionable. Given some piece of code it's hard to say whether or not it does anything excessive. Consider a List with a million elements; as a practical matter, any one of these methods requires visiting every element. Is that excessive? Why or why not? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20128#discussion_r1673223579