RFR: 8301302: Platform preferences API [v26]

Michael Strauß mstrauss at openjdk.org
Sat Nov 18 18:35:34 UTC 2023


On Sat, 18 Nov 2023 17:07:43 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove Preferences.getPaint
>
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/gtk/GtkApplication.java line 486:
> 
>> 484:     @Override
>> 485:     public Map<String, Class<?>> getPlatformKeys() {
>> 486:         return new HashMap<>() {{
> 
> Any reason this map and the like are not `Map.ofEntries`? The double braces syntax is not a good idea in general as it creates a subclass of `HashMap` for just one initialization.

I've replaced `HashMap` with `Map.ofEntries` as you've suggested.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1014#discussion_r1398253245


More information about the openjfx-dev mailing list