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

calling List.removeAll on empty list generates motif warning message

XMLWordPrintable

    • generic, sparc
    • generic, solaris_7

      orig synopsis:
        "JDK 1.1.x: calling List.removeAll on empty list generates
      motif warning message"

      If you create a java.awt.List, and call removeAll on it when it is empty,
      you get an annoying message from Motif.

      Warning:
          Name: slist
          Class: XmList
          Invalid item(s) to delete.

      If you trace the calls down from List.removeAll, you get down to
      src/solaris/sun/awt_List.c, in method: sun_awt_motif_MListPeer_delItems.
      If called from removeAll, start = 0 and end = countItems() = 0.
      Thus the code falls into:
      if (start == end) {
      XmListDeletePos(sdata->list, start);
      which is incorrect, since there is no item to delete.


            ehawkessunw Eric Hawkes (Inactive)
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: