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
8251483: TableCell: NPE on modifying item's list #741
Conversation
…ing item first before the listener which reacts to the index change are notified.
|
Webrevs
|
/reviewers 2 |
@kevinrushforth |
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.
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 changed code makes sense, and fixes the issue.
@Maran23 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 60 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. 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 (@aghaisas) but any other Committer may sponsor as well.
|
/integrate |
/sponsor |
Going to push as commit 222b2b1.
Your commit was automatically rebased without conflicts. |
This PR fixes an issue where the item of the table row is null, although the cell itself is not empty (non null value).
The fix is to call
indexChanged(..)
immediately after the index was changed, but before allindexProperty()
listener are notified.The then notified listener in
TableRowSkinBase
will update the underlying cells, which will eventually result in an call toupdateItem(..)
, where the NPE happened (and now not anymore, since the table row is now correctly setup before).There is one special case: When the index didn't changed at all, we manually call
indexChanged(..)
(just like before) since when a property is not changed,invalidated()
is not called, but we need to notify subclasses thatupdateIndex(..)
was called.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/741/head:pull/741
$ git checkout pull/741
Update a local copy of the PR:
$ git checkout pull/741
$ git pull https://git.openjdk.org/jfx pull/741/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 741
View PR using the GUI difftool:
$ git pr show -t 741
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/741.diff