RFR: 7083187: Class CSS.CssValue is missing implementations of equals() and hashCode() [v2]
Alexey Ivanov
aivanov at openjdk.org
Fri May 5 18:05:25 UTC 2023
On Wed, 3 May 2023 21:14:25 GMT, Phil Race <prr at openjdk.org> wrote:
>> I'm pretty sure the test will still pass because Java compiler interns strings. You have to explicitly create a new instance of the String to make the test fail.
>>
>> In real applications, attributes are parsed from a style sheet and therefore the identity test won't pass.
>
> yes this needs to be changed.
> Also needs to be changed at line 2034.
The following test still fails.
private static void testFontFamilyCSS() {
StyleSheet ss = new StyleSheet();
AttributeSet a = ss.getDeclaration("font-family: sans-serif");
AttributeSet b = ss.getDeclaration("font-family: sans-serif");
// Verify a.isEqual(b)
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13405#discussion_r1186360256
More information about the client-libs-dev
mailing list