On Mon, 8 Jul 2024 16:46:00 GMT, Joe Darcy <da...@openjdk.org> wrote:

>> Make well-behaved implementation expectations of Object.{toString, hashCode} 
>> explicit.
>
> Joe Darcy has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Update wording.

Specifying that toString returns a non-null result is good.  Specifying that 
the methods don't throw any exceptions, or an implSpec that the methods 
shouldn't throw is okay.

I'm less sure about the proposed wording for resource usage. For hashCode then 
maybe it should say that the hashCode method may be called very frequently and 
should be as fast and use as few resources as possible.

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

PR Comment: https://git.openjdk.org/jdk/pull/20063#issuecomment-2214849998

Reply via email to