-
Bug
-
Resolution: Fixed
-
P3
-
8
Wrong order of notifications is currently used for ObservableLists.
The only correct order is permutation(s) - add/remove - updates
This is because permutations *cannot* be done after "add/remove", because add/remove operation must point to the current state of the list. If a permutation was after add/remove, the indexes in add/remove would have to be wrong.
The second reason is that update notifications *must* be done after "remove/add" as updates must also point to the current state of the list and current state of the list is reached only after all remove/add operations were processed.
Note: we should also explain this in the Javadoc
The only correct order is permutation(s) - add/remove - updates
This is because permutations *cannot* be done after "add/remove", because add/remove operation must point to the current state of the list. If a permutation was after add/remove, the indexes in add/remove would have to be wrong.
The second reason is that update notifications *must* be done after "remove/add" as updates must also point to the current state of the list and current state of the list is reached only after all remove/add operations were processed.
Note: we should also explain this in the Javadoc