JMenu.remove(JMenuItem item) throws exception

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.2.0
    • Component/s: client-libs



      Name: rk38400 Date: 11/10/98


      the following function removes the object 'item' from the listenerRegistry twice. this cause an exception to be throw on
      the second remove() call

          public void remove(JMenuItem item) {
              popupMenu.remove(item);
          if (listenerRegistry != null) {
      #1---> ActionChangedListener p = (ActionChangedListener) listenerRegistry.remove(item);
      #2---> Action a = (Action)listenerRegistry.remove(p);
              item.removeActionListener(a);
              if (p!=null)
              p.setTarget(null);
              if (a!=null)
              a.removePropertyChangeListener(p);
          }
          }
      (Review ID: 42292)
      ======================================================================

            Assignee:
            Georges Saab
            Reporter:
            Ralph Kar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: