harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r496695 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java test/api/java/common/javax/swing/plaf/basic/BasicFileChooserUITest.java
Date Tue, 16 Jan 2007 14:10:52 GMT
Author: hindessm
Date: Tue Jan 16 06:10:50 2007
New Revision: 496695

URL: http://svn.apache.org/viewvc?view=rev&rev=496695
Log:
Applying patches from "[#HARMONY-2822] [classlib][swing]
javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(null) returns
null while RI throws NPE".

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicFileChooserUITest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java?view=diff&rev=496695&r1=496694&r2=496695
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java
Tue Jan 16 06:10:50 2007
@@ -524,6 +524,10 @@
     }
 
     protected void installDefaults(final JFileChooser fc) {
+        if (fc == null) {
+            throw new NullPointerException();
+        }
+ 
         helpButtonMnemonic = UIManager.getInt("FileChooser.helpButtonMnemonic");
         directoryOpenButtonMnemonic = UIManager.getInt("FileChooser.directoryOpenButtonMnemonic");
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicFileChooserUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicFileChooserUITest.java?view=diff&rev=496695&r1=496694&r2=496695
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicFileChooserUITest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicFileChooserUITest.java
Tue Jan 16 06:10:50 2007
@@ -185,4 +185,17 @@
             fail("NPE should not be thrown");            
         }
     }
+
+    public void testInstallDefaults() {
+        try {
+            new BasicFileChooserUI(null) {
+                public void installDefaults(JFileChooser fc) {
+                    super.installDefaults(fc);
+                }
+            }.installDefaults(null);
+            fail("NPE should be thrown");
+        } catch (NullPointerException npe) {
+            // Passed
+        }
+    }
 }



Mime
View raw message