harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r496712 - /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicInternalFrameUITest.java
Date Tue, 16 Jan 2007 14:45:22 GMT
Author: hindessm
Date: Tue Jan 16 06:45:20 2007
New Revision: 496712

URL: http://svn.apache.org/viewvc?view=rev&rev=496712
Log:
Applying test patch from "[#HARMONY-2765] [classlib][swing]
javax.swing.plaf.basic.BasicInternalFrameUI. createNorthPane(null) does
not throw unspecified NPE".

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

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicInternalFrameUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicInternalFrameUITest.java?view=diff&rev=496712&r1=496711&r2=496712
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicInternalFrameUITest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicInternalFrameUITest.java
Tue Jan 16 06:45:20 2007
@@ -334,7 +334,25 @@
         JComponent comp2 = ui.createNorthPane(frame);
         assertTrue("new object", comp != comp2);
         assertTrue("northPane", ui.getNorthPane() != comp2);
+        
+        try { 
+            BasicInternalFrameUIExt f = new BasicInternalFrameUIExt(null);
+            f.createNorthPane(null);
+            fail("NPE should be thrown");
+        } catch (NullPointerException npe) {              
+            // PASSED            
+        }
     }
+
+    class BasicInternalFrameUIExt extends BasicInternalFrameUI {
+        BasicInternalFrameUIExt (JInternalFrame c) {
+            super(c);
+        }
+        
+        public JComponent createNorthPane(JInternalFrame c) {
+            return super.createNorthPane(c);
+        }
+    } 
 
     /*
      * Class under test for JComponent createEastPane(JInternalFrame)



Mime
View raw message