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

List.delItems and List.clear leave last item in display

XMLWordPrintable

    • 1.0beta2
    • generic
    • solaris_2.4
    • Not verified

      I create a list with 5 items, I clear the list with List.clear(),
      I add the 5 items back tot he list, and the display shows 6 items
      where the first item is a duplciate of the last item. Similarly,
      if I delete the last 2 items with delItems(3, 4) and add them back,
      I end up with 6 items with the last item duplicated after the third
      item.

      This appears to be an off-by-one bug in the List peer code (my guess).
      Unfortunately, I can't find a java-only workaround for this, other than
      destroying the entire List object and recreating, which is not a pleasant
      user interface experience.

            sshaiosunw Sami Shaio (Inactive)
            bshannon Bill Shannon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: