Found by Dirk Lemmermann,
So elegant now, to describe these bugs with a simple unit test. :)
@Test
public void shouldCollectBoundListProperty() {
JMemoryBuddy.memoryTest(checker -> {
// given
ListProperty<Object> listA = new SimpleListProperty<>(FXCollections.observableArrayList());
ListProperty<Object> listB = new SimpleListProperty<>(FXCollections.observableArrayList());
listB.bind(listA);
// when
listB.unbind();
// then
checker.setAsReferenced(listB);
checker.assertCollectable(listA);
});
}
So elegant now, to describe these bugs with a simple unit test. :)
@Test
public void shouldCollectBoundListProperty() {
JMemoryBuddy.memoryTest(checker -> {
// given
ListProperty<Object> listA = new SimpleListProperty<>(FXCollections.observableArrayList());
ListProperty<Object> listB = new SimpleListProperty<>(FXCollections.observableArrayList());
listB.bind(listA);
// when
listB.unbind();
// then
checker.setAsReferenced(listB);
checker.assertCollectable(listA);
});
}
- links to
-
Review
openjdk/jfx/689
-
Review(master)
openjdk/jfx/689