Skip to content

8237372: NullPointerException in TabPaneSkin.stopDrag #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

effad
Copy link

@effad effad commented Jan 20, 2020

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

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

JDK-8237372: NullPointerException in TabPaneSkin.stopDrag

Approvers

  • Ambarish Rapte (arapte - Reviewer)

Test simulates a single mouse-released event.
Fix simply guards against the null case.
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 20, 2020

👋 Welcome back rlichten! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@openjdk openjdk bot added the rfr Ready for review label Jan 20, 2020
@mlbridge
Copy link

mlbridge bot commented Jan 20, 2020

Webrevs

@kevinrushforth
Copy link
Member

@arapte - can you review this?

The only question I have is whether is is expected that dragTabHeader can be null. If we understand why it is null, and that it isn't an error for it to be null, then the fix is fine. If its being null is unexpected, then the fix might just be masking the real problem. There isn't enough information in this PR to be able to evaluate this.

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scenario mentioned in 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.

Make check depend on dragState, not on dragTabHeader != null
Remove early return which makes method clearer
Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

I did notice some unrelated changes that should be reverted.

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix looks good, suggested minor changes in test.

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good to me.
Verified that the new test fails before and passes after fix and observed no test failures.

@openjdk
Copy link

openjdk bot commented Jan 28, 2020

@effad This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

8237372: NullPointerException in TabPaneSkin.stopDrag

Reviewed-by: arapte
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 4 commits pushed to the jfx14 branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to do this manually, please merge jfx14 into your branch first.

As you do not have Committer status in this project, an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@arapte, @kevinrushforth) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Ready to be integrated label Jan 28, 2020
@kevinrushforth
Copy link
Member

I don't have any additional comment, so this is good to go with 1 reviewer. @arapte can sponsor this.

@effad
Copy link
Author

effad commented Jan 29, 2020

/integrate

@openjdk openjdk bot added the sponsor Ready to sponsor label Jan 29, 2020
@openjdk
Copy link

openjdk bot commented Jan 29, 2020

@effad
Your change (at version 39a6182) is now ready to be sponsored by a Committer.

@arapte
Copy link
Member

arapte commented Jan 29, 2020

/sponsor

@openjdk openjdk bot closed this Jan 29, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Ready to sponsor ready Ready to be integrated labels Jan 29, 2020
@openjdk
Copy link

openjdk bot commented Jan 29, 2020

@arapte @effad The following commits have been pushed to jfx14 since your change was applied:

  • 79fc0d0: 8232824: Removing TabPane with strong referenced content causes memory leak from weak one
  • aa6f3a4: 8236912: NullPointerException when clicking in WebView with Button 4 or Button 5
  • da99e24: 8237823: Mark TextTest.testTabSize as unstable
  • 9ae37f1: 8236753: Animations do not play backwards after being stopped

Your commit was automatically rebased without conflicts.

Pushed as commit 5a0e71b.

@mlbridge
Copy link

mlbridge bot commented Jan 29, 2020

Mailing list message from Ambarish Rapte on openjfx-dev:

Changeset: 5a0e71b
Author: Robert Lichtenberger <rlichten at openjdk.org>
Committer: Ambarish Rapte <arapte at openjdk.org>
Date: 2020-01-29 06:25:21 +0000
URL: https://git.openjdk.java.net/jfx/commit/5a0e71b8

8237372: NullPointerException in TabPaneSkin.stopDrag

Reviewed-by: arapte

! modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java
! modules/javafx.controls/src/test/java/test/javafx/scene/control/TabPaneTest.java

@mlbridge
Copy link

mlbridge bot commented Jan 29, 2020

Mailing list message from Ambarish Rapte on openjfx-dev:

Changeset: 5a0e71b
Author: Robert Lichtenberger <rlichten at openjdk.org>
Committer: Ambarish Rapte <arapte at openjdk.org>
Date: 2020-01-29 06:25:21 +0000
URL: https://git.openjdk.java.net/jfx/commit/5a0e71b8

8237372: NullPointerException in TabPaneSkin.stopDrag

Reviewed-by: arapte

! modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java
! modules/javafx.controls/src/test/java/test/javafx/scene/control/TabPaneTest.java

@kevinrushforth kevinrushforth removed the rfr Ready for review label Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants