RFR: 8301302: Platform preferences API [v20]
Nir Lisker
nlisker at openjdk.org
Thu Nov 2 19:15:12 UTC 2023
On Wed, 1 Nov 2023 17:36:21 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> Please read [this document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) for an introduction to the Platform Preferences API, and how it interacts with the proposed style theme and stage appearance features.
>
> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>
> changend bool comparison
modules/javafx.graphics/src/main/java/com/sun/javafx/application/preferences/PlatformPreferences.java line 198:
> 196: * @throws NullPointerException if {@code preferences} is {@code null}
> 197: */
> 198: public void update(Map<String, Object> preferences) {
I want to make sure I understand the exact details of the update rules. Is this correct?
For each key in `preferences`:
* if it exists in `effectivePreferences`:
* if the values are the same, there is no change (`preferences` contains all mapping and not just the changes)
* if the value in `preferences` is `null`, then this is a removal operation (because the value of `effectivePreferences` can't be `null`)
* if the value in `preferences` is not `null` and not the same, then this is an update operation
* if it doesn't exist in `effectivePreferences`:
* if the value in `preferences` is not `null`, then this is an add operation
* can the value in `preferences` be `null`?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1014#discussion_r1380658831
More information about the openjfx-dev
mailing list