Sometimes the MultipleSelectionModel throws IndexOutOfBoundException.
Details can be extracted from the unit-test.
Fix with PR will follow any moment.
```
@Test
public void testMultipleSelectionModelSpecialCase() throws InterruptedException {
ListView<String> listView = new ListView<>();
listView.getItems().add("item-0");
listView.getItems().add("item-1");
listView.getItems().add("item-2");
listView.getItems().add("item-3");
MultipleSelectionModel<String> selectionModel = listView.getSelectionModel();
selectionModel.setSelectionMode(SelectionMode.MULTIPLE);
selectionModel.getSelectedIndices().addListener((ListChangeListener<? super Integer>) c -> {
while (c.next()) {
try {
c.getAddedSubList(); // --> java.lang.IndexOutOfBoundsException: [ fromIndex: 0, toIndex: 5, size: 3 ]
} catch (IndexOutOfBoundsException e) {
fail(e.getMessage());
}
}
});
selectionModel.selectIndices(0, /*1, IMPORTANT: remove some index */ 2, 3);
}
```
Details can be extracted from the unit-test.
Fix with PR will follow any moment.
```
@Test
public void testMultipleSelectionModelSpecialCase() throws InterruptedException {
ListView<String> listView = new ListView<>();
listView.getItems().add("item-0");
listView.getItems().add("item-1");
listView.getItems().add("item-2");
listView.getItems().add("item-3");
MultipleSelectionModel<String> selectionModel = listView.getSelectionModel();
selectionModel.setSelectionMode(SelectionMode.MULTIPLE);
selectionModel.getSelectedIndices().addListener((ListChangeListener<? super Integer>) c -> {
while (c.next()) {
try {
c.getAddedSubList(); // --> java.lang.IndexOutOfBoundsException: [ fromIndex: 0, toIndex: 5, size: 3 ]
} catch (IndexOutOfBoundsException e) {
fail(e.getMessage());
}
}
});
selectionModel.selectIndices(0, /*1, IMPORTANT: remove some index */ 2, 3);
}
```