RFR: 8187145: (Tree)TableView with null selectionModel: throws NPE on sorting
Andy Goryachev
angorya at openjdk.org
Thu Aug 18 18:17:11 UTC 2022
Setting a null selection model in TableView and TreeTableView produce NPE on sorting (and probably in some other situations) because the check for null is missing in several places.
Setting a null selection model is a valid way to disable selection in a (tree)table.
There is also a similar issue with ListView [JDK-8279640](https://bugs.openjdk.org/browse/JDK-8279640).
changes:
- added check for null selection model where it was missing
- clearing focused row index on setting null selection model in TreeTableView
-------------
Commit messages:
- 8187145: whitespace
- 8187145: clear focus
- 8187145: tree table view
- 8187145: fall through
- 8187145: check for null selection model
Changes: https://git.openjdk.org/jfx/pull/876/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=876&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8187145
Stats: 182 lines in 11 files changed: 89 ins; 10 del; 83 mod
Patch: https://git.openjdk.org/jfx/pull/876.diff
Fetch: git fetch https://git.openjdk.org/jfx pull/876/head:pull/876
PR: https://git.openjdk.org/jfx/pull/876
More information about the openjfx-dev
mailing list