harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r464321 - /incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicRootPaneUI.java
Date Sun, 15 Oct 2006 23:26:45 GMT
Author: ndbeyer
Date: Sun Oct 15 16:26:45 2006
New Revision: 464321

URL: http://svn.apache.org/viewvc?view=rev&rev=464321
Log:
Apply patch for HARMONY-1867: [swing][jEdit] NPE in BasicRootPaneUI$DefaultButtonAction after
pressing "Enter" in jEdit

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicRootPaneUI.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicRootPaneUI.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicRootPaneUI.java?view=diff&rev=464321&r1=464320&r2=464321
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicRootPaneUI.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicRootPaneUI.java
Sun Oct 15 16:26:45 2006
@@ -32,6 +32,7 @@
 import javax.swing.AbstractAction;
 import javax.swing.ActionMap;
 import javax.swing.InputMap;
+import javax.swing.JButton;
 import javax.swing.JComponent;
 import javax.swing.JPopupMenu;
 import javax.swing.JRootPane;
@@ -67,7 +68,8 @@
         }
 
         public boolean isEnabled() {
-            return root.getDefaultButton().isEnabled();
+            JButton defaultButton = root.getDefaultButton();
+            return (defaultButton == null) ? false : defaultButton.isEnabled();
         }
 
         public void actionPerformed(final ActionEvent e) {



Mime
View raw message