On Fri, 15 Jan 2021 12:53:43 GMT, Stanimir Stamenkov 
<github.com+1247730+sta...@openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java line 
>> 3423:
>> 
>>> 3421:      */
>>> 3422:     static final Object FONT_SIZE_INHERIT =
>>> 3423:             new CSS().new FontSize().parseCssValue("100%");
>> 
>> Do we need to instantiate new CSS object here? Can't we reuse "css" variable 
>> which is already initialized?
>
> I hadn't previously realized the `ViewAttributeSet` class is not static, so 
> it should be possible to reuse the instance `css`.  Not sure if a separate 
> instance per style sheet is necessary, but I'll prepare a revision.

I have now made it use the instance `StyleSheet.css` variable.

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

PR: https://git.openjdk.java.net/jdk/pull/1759

Reply via email to