Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8114666 SortedList AIOOB replacing last element in wrapped list
  3. JDK-8114787

Same as parent - no way to comment, so creating a sub-task

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • fx2.0
    • javafx
    • None

      "By doing:
      original.get(3).value = 0;
      you changed the last element internally, so the SortedList has no way to know that something changed and will result in (LIVE) SortedList that is actually not sorted."

      I think that's not the point: fully agreed that mutating elements under the feet of the list isn't a good idea (no way for the list the handle), the point is setting the mutated element throws. From the perspective of an observer (like a sorted list) of the original list, it's just a replaced element and the observer must cope with it

            mheinrichs Michael Heinrichs (Inactive)
            fastegal Jeanette Winzenburg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: