RFR: 8089398: [ChoiceBox, ComboBox] throws NPE on setting value on null selectionModel [v3]
Jeanette Winzenburg
fastegal at openjdk.java.net
Thu Jul 8 10:22:57 UTC 2021
On Wed, 7 Jul 2021 19:29:53 GMT, Marius Hanl <mhanl at openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ComboBoxListViewSkin.java line 401:
>>
>>> 399: private void updateValue() {
>>> 400: SingleSelectionModel<T> comboBoxSM = comboBox.getSelectionModel();
>>> 401: if (comboBoxSM == null) {
>>
>> Similar null check can be added to layoutChildren() method as well.
>
> added.
Hmm ... wondering whether we really want to widen the scope of this issue
- it started with being focused on NPE on the change of property value, for both Choice/ComboBox
- turned out combo's skin also has a throwing listener to value
- review spotted an additional failure candidates in ComboBox' editable property
- plus a sore spot in combo's skin (one of the locations where list/combo selection is sync'ed, there are others ;)
the first two are naturally within the original scope, the third is near enough (a property on one of the covered controls) to be included .. the last is arguable, IMO - would tend to not include it here but open a follow-up to then include _all_ sync issues in the skin (probably needs more digging and definitely more testing).
Thoughts?
-------------
PR: https://git.openjdk.java.net/jfx/pull/557
More information about the openjfx-dev
mailing list