RFR: 8089398: [ChoiceBox, ComboBox] throws NPE on setting value on null selectionModel [v5]

Marius Hanl mhanl at openjdk.java.net
Tue Jul 27 12:41:03 UTC 2021


On Tue, 27 Jul 2021 09:55:47 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>  ComboBox<String> comboBox = new ComboBox<>(items);
>  comboBox.setSelectionModel(null);
>  installDefaultSkin(comboBox);

Ahh yes, I see, nice catch. I will fix it and update this PR. 

But I'm wondering, this might require more as we don't set this dirty flag anymore as soon as we install a selection model again.
But thinking about this more, this would be a general problem as soon as we switch the combox selection model.
EDIT: Or maybe there is no issue at all and this listener can be removed.

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

PR: https://git.openjdk.java.net/jfx/pull/557


More information about the openjfx-dev mailing list