Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8124722

ObservableLists has wrong order of notification types

XMLWordPrintable

      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

            msladecek Martin Sládeček
            msladecek Martin Sládeček
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: