RFR: 8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize

Marius Hanl mhanl at openjdk.org
Tue Jun 28 17:14:12 UTC 2022


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 a `VirtualFlow` 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

-------------

Commit messages:
 - 8289357: Initialize the (Tree)TableView when creating the measure row. Also prevent a NPE as we don't have a VirtualFlow in the context of autosizing

Changes: https://git.openjdk.org/jfx/pull/805/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=805&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8289357
  Stats: 154 lines in 5 files changed: 152 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/805.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/805/head:pull/805

PR: https://git.openjdk.org/jfx/pull/805


More information about the openjfx-dev mailing list