RFR: 8301302: Platform preferences API [v5]

Michael Strauß mstrauss at openjdk.org
Tue Sep 5 23:04:06 UTC 2023


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

>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Removed application preferences implementation
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/application/preferences/ChangedValue.java line 47:
> 
>> 45:      * @return a mapping of keys to changed values
>> 46:      */
>> 47:     public static Map<String, ChangedValue> getEffectiveChanges(Map<String, Object> old, Map<String, Object> current) {
> 
> this class does not handle addition of keys in `current` - should we explain this fact in this method and/or the class javadoc?

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.

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

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


More information about the openjfx-dev mailing list