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
8269871: CellEditEvent: must not throw NPE in accessors #611
Conversation
|
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Good to see this fixed, I remember I had some NPEs in the past because of a null table position.
There was a problem hiding this 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.
Minor : Two comments from tests need to be removed.
...afx.controls/src/test/java/test/javafx/scene/control/CellEditEventOfTreeTableColumnTest.java
Outdated
Show resolved
Hide resolved
.../javafx.controls/src/test/java/test/javafx/scene/control/CellEditEventOfTableColumnTest.java
Outdated
Show resolved
Hide resolved
@kleopatra This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the
|
/integrate |
Going to push as commit 78ae4a8.
Your commit was automatically rebased without conflicts. |
@kleopatra Pushed as commit 78ae4a8. |
The issue is unguarded access to tablePosition though it might be null (since JDK-8120610
The fix is to check against null in each accessor. Also required to fix the default onEditCommit handlers in Tree/TableColumn to really cope with null TablePostion on the event.
Added tests that failed/pass before/after the fix.
Note that there was an old test (in Tree/TableColumnTest each), that failed after the fix because it expected the NPE. Fixed by removing the expected parameter.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/611/head:pull/611
$ git checkout pull/611
Update a local copy of the PR:
$ git checkout pull/611
$ git pull https://git.openjdk.java.net/jfx pull/611/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 611
View PR using the GUI difftool:
$ git pr show -t 611
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/611.diff