Hi,
this patch fixes a NullPointerException which happens in JMenu.removeAll. This
problem was easily spotable using our Swing demo.

The ChangeLog:

2006-06-22  Robert Schuster  <[EMAIL PROTECTED]>

        * javax/swing/JMenu.java:
        (removeAll): Added check for popupMenu not being null.


cya
Robert
Index: javax/swing/JMenu.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JMenu.java,v
retrieving revision 1.28
diff -u -r1.28 JMenu.java
--- javax/swing/JMenu.java	21 Jun 2006 14:55:03 -0000	1.28
+++ javax/swing/JMenu.java	22 Jun 2006 13:20:36 -0000
@@ -250,7 +250,8 @@
    */
   public void removeAll()
   {
-    popupMenu.removeAll();
+    if (popupMenu != null)
+      popupMenu.removeAll();
   }
 
   /**

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to