RFR: 8165749: java.lang.RuntimeException: dndGesture.dragboard is null in dragDrop [v2]

Jose Pereda jpereda at openjdk.java.net
Sat Jan 9 16:54:10 UTC 2021

> As commented in the JBS issue, there is one single `dndGesture` object in `Scene`, that can be instantiated from three different ways: 
> - DropTargetListener, on dragEnter 
> - DragGestureListener, on dragGestureRecognized or 
> - MouseHandler, processing a right mouse click (these two are mutually exclusive).  
> This PR prevents that, for two almost simultaneous drag events (for instance via mouse and touchpad), the `dndGesture` for the last of these events gets initialized again, losing all existing drag info (`dndGesture.dragboard`) that was added to the first one, avoiding the RTE.
> The existing manual test [DndTest](https://github.com/openjdk/jfx/blob/master/tests/manual/dnd/DndTest.java) has been used on MacOS to verify the PR.

Jose Pereda has updated the pull request incrementally with one additional commit since the last revision:

  Avoid setting gestureStarted if there is a drag gesture in process


  - all: https://git.openjdk.java.net/jfx/pull/372/files
  - new: https://git.openjdk.java.net/jfx/pull/372/files/096a628e..4f60fa9e

 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=372&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=372&range=00-01

  Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jfx/pull/372.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/372/head:pull/372

PR: https://git.openjdk.java.net/jfx/pull/372

More information about the openjfx-dev mailing list