RFR: 8272808: Update constant collections to use the new immutable collections - leftovers

Nir Lisker nlisker at openjdk.java.net
Fri Sep 24 02:52:53 UTC 2021

On Thu, 23 Sep 2021 18:03:37 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

>> Replacements of more immutable collections.
>> One thing I found was that the field `idMap` in `com.sun.java.scene.web.WebViewHelper.WebView` seems unused. I can remove it if that's indeed the case.
> modules/javafx.graphics/src/main/java/com/sun/javafx/font/WindowsFontMap.java line 44:
>> 42:     }
>> 43: 
>> 44:     private static Map<String, FamilyDescription> PLATFORM_FONT_MAP;
> Shouldn't this variable name stay with the normal camel case because it is not final (only static)?

Yes, but it's created only once via lazy initialization and then it's effectively final. A matter of taste I would say. There is also a JEP that deals with these cases https://openjdk.java.net/jeps/8209964.


PR: https://git.openjdk.java.net/jfx/pull/627

More information about the openjfx-dev mailing list