RFR: 7083187: Class CSS.CssValue is missing implementations of equals() and hashCode() [v10]
Alexey Ivanov
aivanov at openjdk.org
Wed May 31 08:57:10 UTC 2023
On Tue, 30 May 2023 17:18:42 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 2219:
>>
>>> 2217: public int hashCode() {
>>> 2218: return Float.hashCode(value);
>>> 2219: }
>>
>> why isn't index and lu part of this ?
>
> It is because only the float "value" is being considered and not the `lu` units px/pt
Yet `equals` currently just compares `svalue`… It looks weird.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13405#discussion_r1211319419
More information about the client-libs-dev
mailing list