-
Bug
-
Resolution: Unresolved
-
P4
-
8u20
The test below is failing. I would expect:
- to receive a changeEvent on changing the identity of the list
- to receive a listChangeEvent on both modifying the list and changing the identity of the list
- to not receive a changeEvent on modifying a list
first two expectations seem to be met (as experimented so far) but not the last. Not entirely sure, though, it the expectation is correct. ListProperty isn't used at all internally in the controls related code (which is a pity, would make listening to collection-values properties much cleaner), so no examples to learn from)
@Test
public void testListPropertyChangeNotificationOnRemoveItem() {
ObservableList<String> list = createObservableList(true);
ListProperty<String> listProperty = new SimpleListProperty<>(list);
ChangeReport report = new ChangeReport(listProperty);
list.remove(0);
assertEquals("listProperty must not fire changeEvent on removing item", 0, report.getEventCount());
}
- to receive a changeEvent on changing the identity of the list
- to receive a listChangeEvent on both modifying the list and changing the identity of the list
- to not receive a changeEvent on modifying a list
first two expectations seem to be met (as experimented so far) but not the last. Not entirely sure, though, it the expectation is correct. ListProperty isn't used at all internally in the controls related code (which is a pity, would make listening to collection-values properties much cleaner), so no examples to learn from)
@Test
public void testListPropertyChangeNotificationOnRemoveItem() {
ObservableList<String> list = createObservableList(true);
ListProperty<String> listProperty = new SimpleListProperty<>(list);
ChangeReport report = new ChangeReport(listProperty);
list.remove(0);
assertEquals("listProperty must not fire changeEvent on removing item", 0, report.getEventCount());
}
- relates to
-
JDK-8088928 javafx.beans.property.SimpleMapProperty with multiple addListeners does not call them.
- Open