JMenu.removeAll() (Swing 1.1) doesn't work.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.2.2
    • Affects Version/s: 1.1.6, 1.1.7, 1.2.0, 1.2.2
    • Component/s: client-libs
    • 1.2.2
    • generic, sparc
    • generic, solaris_2.5.1



      Name: dbT83986 Date: 12/15/98


      The implementation of JMenu.removeAll() in the Swing 1.1 release(not one included in JDK1.2) doesn't work correctly.
      The removeAll() doesn't check if its member "popupMenu" is not null. The following is a fixed version.

      /**
       * Remove all menu items from this menu.
       */
      public void removeAll() {
          if (popupMenu != null) // Missed code
              popupMenu.removeAll();
          clearListenerRegistry();
          }
      (Review ID: 47953)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: