RFR: 8336043: Add quality of implementation discussion to Object.{equals, toString, hashCode} [v3]
Joe Darcy
darcy at openjdk.org
Wed Jul 24 05:37:03 UTC 2024
On Thu, 11 Jul 2024 00:11:07 GMT, Stuart Marks <smarks at openjdk.org> wrote:
>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Respond to review feedback.
>
> src/java.base/share/classes/java/lang/Object.java line 191:
>
>> 189: * should not be thrown if the argument has an incomparable type
>> 190: * to this object and {@link NullPointerException} should not be
>> 191: * thrown if the argument is {@code null}. The implementation
>
> For these cases the recommendation should be to return false instead of throwing such exceptions.
Good point; updated accordingly.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20128#discussion_r1689162089
More information about the core-libs-dev
mailing list