On Fri, 3 Sep 2021 19:10:40 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
> Can we get a unit test for this case? This is a test that fails without the fix, and passes with the fix. However, there are no assertions, which is... strange. Once [JDK-8273336](https://bugs.openjdk.java.net/browse/JDK-8273336) is fixed, the test could validate the selection state. @Test public void test_jdk_8273324() { class Person { final String firstName, lastName; Person(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } } var tableView = new TableView<Person>(); tableView.getSelectionModel().setCellSelectionEnabled(true); tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE); var col1 = new TableColumn<Person, String>(); col1.setCellValueFactory(new PropertyValueFactory<>("firstName")); var col2 = new TableColumn<Person, String>(); col2.setCellValueFactory(new PropertyValueFactory<>("lastName")); tableView.getColumns().addAll(List.of(col1, col2)); var ab = new Person("a", "b"); tableView.getItems().add(ab); var cd = new Person("c", "d"); tableView.getItems().add(cd); tableView.getSelectionModel().select(0); tableView.getSelectionModel().clearAndSelect(0, col1); } ------------- PR: https://git.openjdk.java.net/jfx/pull/617