[ComboBox] IndexOutOfBoundsException when onAction handler changes the selection.

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 9
    • Component/s: javafx
    • None
    • generic
    • generic

      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.

            Assignee:
            Unassigned
            Reporter:
            Tomas Mikula
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: