On Tue, 1 Sep 2026 12:57:14 GMT, Nir Lisker <[email protected]> wrote:
>> Andy Goryachev has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains eight additional
>> commits since the last revision:
>>
>> - Merge remote-tracking branch 'origin/master' into 8373452.dataformat.2
>> - Merge branch 'master' into 8373452.dataformat.2
>> - review comments
>> - Merge branch 'master' into 8373452.dataformat.2
>> - review comments
>> - review comments
>> - nulls
>> - data format
>
> modules/javafx.graphics/src/main/java/javafx/scene/input/DataFormat.java line
> 42:
>
>> 40: // A static registry of DataFormats for the purposes of checking
>> against constructing DataFormats
>> 41: // that contain mismatched mime types.
>> 42: private static final HashMap<String,DataFormat> registry = new
>> HashMap<>();
>
> Suggestion:
>
> private static final Map<String, DataFormat> registry = new HashMap<>();
>
>
> We usually code to an interface, not an implementation.
I prefer to know what I am dealing with. The rule you mentioned is applicable
to methods, or when the field can be instantiated with different types. does
not apply in this case.
> modules/javafx.graphics/src/main/java/javafx/scene/input/DataFormat.java line
> 89:
>
>> 87: * and breaking our drag view implementation.
>> 88: */
>> 89: private static final DataFormat DRAG_IMAGE_OFFSET = new
>> DataFormat("application/x-java-drag-image-offset");
>
> `DRAG_IMAGE` and `DRAG_IMAGE_OFFSET` are unused (and were unused before this
> PR). I don't know where they were supposed to be used, maybe there's some
> missing wiring somewhere. They could possibly be removed.
these are being used in `c.s.glass.ui.Clipboard` and `glass_dnd.cpp`
I think we should add a comment (it won't be visible in the API spec)
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2197#discussion_r3908298541
PR Review Comment: https://git.openjdk.org/jfx/pull/2197#discussion_r3908283608