Re: [Rev 01] RFR: 8237372: NullPointerException in TabPaneSkin.stopDrag

2020-01-26 Thread Robert Lichtenberger
On Fri, 24 Jan 2020 15:41:20 GMT, Kevin Rushforth  wrote:

>> The pull request has been updated with 1 additional commit.
> 
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java
>  line 1994:
> 
>> 1993: private ListChangeListener childListener = new 
>> ListChangeListener() {
>> 1994: @Override
>> 1995: public void onChanged(Change change) {
> 
> Please revert.

Reverted the Overrides-Annotations inserted by eclipse.

-

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


Re: [Rev 01] RFR: 8237372: NullPointerException in TabPaneSkin.stopDrag

2020-01-24 Thread Kevin Rushforth
On Fri, 24 Jan 2020 15:43:25 GMT, Robert Lichtenberger  
wrote:

>> Test simulates a single mouse-released event.
>> Fix simply guards against the null case.
> 
> The pull request has been updated with 1 additional commit.

This is a simple enough change that 1 reviewer will suffice -- @arapte will 
review.

I did notice some unrelated changes that should be reverted.

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

> 1956: }
> 1957: @Override
> 1958: protected void interpolate(double frac) {

This is unrelated to your change. Please revert it.

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

> 1973: }
> 1974: @Override
> 1975: protected void interpolate(double frac) {

Please revert.

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

> 1993: private ListChangeListener childListener = new 
> ListChangeListener() {
> 1994: @Override
> 1995: public void onChanged(Change change) {

Please revert.

-



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


Re: [Rev 01] RFR: 8237372: NullPointerException in TabPaneSkin.stopDrag

2020-01-23 Thread Robert Lichtenberger
> Test simulates a single mouse-released event.
> Fix simply guards against the null case.

The pull request has been updated with 1 additional commit.

-

Added commits:
 - 30290116: 8237372: NullPointerException in TabPaneSkin.stopDrag

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/89/files
  - new: https://git.openjdk.java.net/jfx/pull/89/files/923a63b2..30290116

Webrevs:
 - full: https://webrevs.openjdk.java.net/jfx/89/webrev.01
 - incr: https://webrevs.openjdk.java.net/jfx/89/webrev.00-01

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

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


Re: [Rev 01] RFR: 8237372: NullPointerException in TabPaneSkin.stopDrag

2020-01-23 Thread Robert Lichtenberger
On Wed, 22 Jan 2020 08:01:49 GMT, Ambarish Rapte  wrote:

>> The pull request has been updated with 1 additional commit.
> 
> 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.

You're right, this makes the method cleaner and easier to understand. I've 
adapted the PR.

-

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