RFR: 7083187: Class CSS.CssValue is missing implementations of equals() and hashCode() [v10]

Prasanta Sadhukhan psadhukhan at openjdk.org
Thu Jun 1 08:26:45 UTC 2023


On Tue, 30 May 2023 17:21:30 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 2920:
>> 
>>> 2918:         @Override
>>> 2919:         public boolean equals(Object val) {
>>> 2920:             return val instanceof CSS.BackgroundPosition bp
>> 
>> why isn't "relative" part of equals and hashCode()?
>
> it is said "relative" is 
> 
> bit 0, horizontal relative, bit 1 horizontal relative to
>         // font size, 2 vertical relative to size, 3 vertical relative to
>         // font size
> 
> I was not sure if it is need to be considered in the equals/hashcode contract..

I have added "relative" to equals/hashCode

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13405#discussion_r1212778703



More information about the client-libs-dev mailing list