On Thu, 11 Jul 2024 00:06:33 GMT, Stuart Marks <sma...@openjdk.org> wrote:
> 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? Hmm. In rare cases, I think providing not-quite-actionable advice is on net helpful. My basic goal here is to convey "when you're implementing these methods, be considerate to your expected users." If that results in some extra contemplation during development or code review about whether or not the worst-case behavior of hashCode/toString/equals is excessive, I think that would be a reasonable outcome from this change. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20128#discussion_r1674739279