On Wed, 3 May 2023 21:14:25 GMT, Phil Race <[email protected]> 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