This is the code to reproduce (snippet from the attached file):
ComboBox<Integer> combo = new ComboBox<>(FXCollections.observableArrayList(1, 2, 3));
combo.setOnAction(ae -> combo.getSelectionModel().clearSelection());
Run the attached program and select any item from the ComboBox. IndexOutOfBoundsException will occur.
One can as well change `clearSelection()` in the above code to `select(0)` and then select any item except the first one to reproduce the error.
ComboBox<Integer> combo = new ComboBox<>(FXCollections.observableArrayList(1, 2, 3));
combo.setOnAction(ae -> combo.getSelectionModel().clearSelection());
Run the attached program and select any item from the ComboBox. IndexOutOfBoundsException will occur.
One can as well change `clearSelection()` in the above code to `select(0)` and then select any item except the first one to reproduce the error.