RFR: 8301302: Platform preferences API [v5]

Michael Strauß mstrauss at openjdk.org
Tue Sep 5 23:34:02 UTC 2023


On Tue, 5 Sep 2023 23:21:18 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> It doesn't handle _removals_ of keys in `current`, which is explained in the method documentation:
>> 
>> "Returns a map that contains the _new or changed_ mappings of _current_ compared to _old_.
>> A value has changed if _Objects#equals_ or _Arrays#equals_ returns _false_ when invoked with the old and new value."
>> 
>> If you think this is not clear enough, I can try to improve the wording.
>
> is it actually possible to have keys removed at runtime?

The set of preferences that is reported by a platform is hard-coded in the native platform implementation, and depends on the operating system version. It might indeed be the case that an OS upgrade/downgrade could result in a different set of reported properties, but can this happen while a JavaFX applications remains running?

In any case, even if that were to happen, the current behavior is that a preference that was once reported will not be removed.

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

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


More information about the openjfx-dev mailing list