RFR: 8089398: [ChoiceBox, ComboBox] throws NPE on setting value on null selectionModel [v3]
Jeanette Winzenburg
fastegal at openjdk.java.net
Tue Jul 27 10:01:36 UTC 2021
On Fri, 9 Jul 2021 09:46:04 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>````
> // another test, exposing one of the NPEs in createList
> ComboBox<String> comboBox = new ComboBox<>(items);
> comboBox.setSelectionModel(null);
> installDefaultSkin(comboBox);
>
> the difference is that setup already installs a skin - so at the time of init the selectionModel still is available ;)
still failing
>
> The other access is in the listener to listView's selectedIndex .. it might be a bit tricky to expose in a test, I would go for a combo in a stage/loader, access the list and change its selectedIndex (maybe needs the popup open and/or firing a key onto it)
good fix and test :)
-------------
PR: https://git.openjdk.java.net/jfx/pull/557
More information about the openjfx-dev
mailing list