RFR: 7083187: Class CSS.CssValue is missing implementations of equals() and hashCode() [v16]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Thu Jun 8 10:28:17 UTC 2023
On Thu, 8 Jun 2023 07:22:16 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address hashcode review comment
>
> src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 2684:
>
>> 2682: if (units != null) {
>> 2683: hashCode |= units.hashCode();
>> 2684: }
>
> In previous cases, you used `Objects.hashCode(units)`, I presume, to avoid explicit null-check and branches. Wouldn't it work here too?
Yes, we can do it
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13405#discussion_r1222820846
More information about the client-libs-dev
mailing list