-
Bug
-
Resolution: Fixed
-
P4
-
7u6
-
JavaFX 2.2 build b19 Windows 64-bit (Winodws 7)
SimpleListProperty incorrectly reuses ListChangeListener.Change object for different listeners. This means that only the first registered listener is able to iterate through the change events, while any subsequent listeners cannot. I would expect SimpleListProperty to behave similar compared to a ObseravleList created by FXCollections, since SimpleListProperty implements ObseravbleList.
As far as i understand it, the output of the attached example should be as follows:
"A: [object reference]
B: [object reference]"
Actual output:
"A: [object reference]"
This seems to be due to the fact, that both onChanged methods are invoked with the same ListChangeListener.Change object (which seems reasonable), but without having it reset (which seems unreasonable). Therefore, listeners after the first listener are not able to evaluate the change event in the same way, the first listener was.
As far as i understand it, the output of the attached example should be as follows:
"A: [object reference]
B: [object reference]"
Actual output:
"A: [object reference]"
This seems to be due to the fact, that both onChanged methods are invoked with the same ListChangeListener.Change object (which seems reasonable), but without having it reset (which seems unreasonable). Therefore, listeners after the first listener are not able to evaluate the change event in the same way, the first listener was.
- duplicates
-
JDK-8123363 SimpleListProperty requires ListChangeListener.Change.reset() to be called when multiple ListChangeListeners are added
-
- Closed
-
- relates to
-
JDK-8124672 ListProperty stops firing events after adding a second ChangeListener
-
- Resolved
-