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
8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize #805
8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize #805
Conversation
…. Also prevent a NPE as we don't have a VirtualFlow in the context of autosizing
👋 Welcome back mhanl! A progress list of the required criteria for merging this PR into |
Webrevs
|
…to -1 to prevent triggering of listener
… the now correct row setup
…table-view-null-in-table-row-skin
…table-view-null-in-table-row-skin
/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.
The code change looks quite reasonable to me, but it would be good to get additional eyes on this. @aghaisas will also review it.
@kleopatra do you have any thoughts on this?
I just noticed comments in JDK-8292009 indicating that this PR fixes that bug as well. It would be good to get the review for this fix done. Since JDK-8292009 described a different problem that is also fixed as a result, it seems good to add that issue to this PR. |
@Maran23 GitHub is reporting a merge conflict in two of the test files. Can you merge the latest upstream master into your branch? |
…table-view-null-in-table-row-skin � Conflicts: � modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/TableRowSkinTest.java � modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/TreeTableRowSkinTest.java
Didn't noticed, thanks for the ping.
I will trigger a rebuild soon. |
@andy-goryachev-oracle and I have both seen this recently on some of our GHA runs. It's an intermittent failure, so a rebuild usually works. |
/issue add JDK-8292009 |
@Maran23 |
modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java
Show resolved
Hide resolved
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!
Can anyone else check this out soon? :) |
Sorry about the delay. I do want to see this go in soon, so yes, I can take a look. Perhaps @andy-goryachev-oracle can too? |
we also have #931 in the pipeline. |
Just merged in the latest master to be safe. :) |
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.
Fix 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 changes look good, please resolve the conflict - my #931 got integrated first, sorry.
@Maran23 this pull request can not be integrated into git checkout 8289357-table-view-null-in-table-row-skin
git fetch https://git.openjdk.org/jfx master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
…table-view-null-in-table-row-skin � Conflicts: � modules/javafx.controls/src/main/java/javafx/scene/control/skin/TreeTableRowSkin.java
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.
lgtm
/integrate |
Going to push as commit c900a00. |
Initialize the
(Tree)TableView
when creating the measure row.This will guarantee, that we can access the
(Tree)TableView
in the(Tree)TableRowSkin
, which is currently only null during the autosizing (It is always set otherwise).With this change, a NPE is happening as the
(Tree)TableRow
currently assumes, that there must be aVirtualFlow
somewhere in the scene (parent). I guard against this now.I remembered, that there is a ticket for the above behaviour here: https://bugs.openjdk.org/browse/JDK-8274065
Finally, the
(Tree)TableRow
must be removed after the autosizing and the index must be set to-1
(as for the cell) so that e.g.cancelEdit()
is not triggered. Some tests catched that (seetest_rt_31015
). This did not happen before as the table row setup was not complete, but now the row does know the table and therefore installs some listener on it in order to fire corresponding edit events.Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/805/head:pull/805
$ git checkout pull/805
Update a local copy of the PR:
$ git checkout pull/805
$ git pull https://git.openjdk.org/jfx pull/805/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 805
View PR using the GUI difftool:
$ git pr show -t 805
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/805.diff