On Mon, 20 Jan 2020 10:00:55 GMT, Robert Lichtenberger <rlich...@openjdk.org> 
wrote:

> Test simulates a single mouse-released event.
> Fix simply guards against the null case.

The scenario mentioned in 
[JDK-8237372](https://bugs.openjdk.java.net/browse/JDK-8237372) seems valid 
scenario. However I am not sure if the scenario can be avoided or not. 
Irrespective of that, the code in question should be corrected. Suggested a 
minor change.

modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java
 line 2216:

> 2215:         // Animate tab header being dragged to its final position.
> 2216:         if (dragTabHeader != null) {
> 2217:             dragHeaderSourceX = dragTabHeader.getLayoutX();

This is a situation when reorder was not started.
So a check as `else if (dragState == DragState.REORDER)` seems more correct 
instead of `null` check. With this `else if` the `return;` on line 2213 can be 
removed.

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



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

Reply via email to