Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8125089

Observable List of ListView selected indices does implement .contains correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • fx2.0.2
    • javafx
    • Netbeans on Linux.

      When getting a list of selected indices from a ListView, .contains returns false for the first item in the list.

      Essentially the following code always prints false.
      final ObservableList<Integer> observed =
       listView.getSelectionModel().getSelectedIndices();
       System.out.println(observed.contains(observed.get(0)));

            jgiles Jonathan Giles
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: