Regression bug in TreeView.getSelectionModel().getSelectedItem()

Abu Abdullah falcon.sheep at
Wed Apr 1 05:02:35 UTC 2020


I have old application on jfx bundled with oracle jdk 1.8 working fine.

i have upgraded it to the latest jfx14 but found the following issue:

TreeView.getSelectionModel().getSelectedItem() returns null eventhough that
TreeView.getSelectionModel().getSelectedItems().size() = 1

code is like:
addListener(new ListChangeListener<TreeItem<AudioInfo>>()
public void onChanged(Change<? extends TreeItem<AudioInfo>> change)
int i = TreeView.getSelectionModel().getSelectedItems().size();
// i =1

TreeItem<AudioInfo> node = TreeView.getSelectionModel().getSelectedItem();
// node = null

in the bundled version of jfx, it was working as expected and im able to
retrieve the object.

More information about the openjfx-discuss mailing list