harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r495957 - 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 Sat, 13 Jan 2007 19:50:23 GMT
Author: hindessm
Date: Sat Jan 13 11:50:22 2007
New Revision: 495957

URL: http://svn.apache.org/viewvc?view=rev&rev=495957
Log:
Applying patch from "[#HARMONY-2606] [classlib][swing][plaf]
javax.swing.plaf.basic.BasicFileChooserUI.ensureFileIsVisible(..) throws
unexpected 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=495957&r1=495956&r2=495957
==============================================================================
--- 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
Sat Jan 13 11:50:22 2007
@@ -613,6 +613,7 @@
     }
 
     public void ensureFileIsVisible(final JFileChooser fc, final File f) {
+        fileChooser = fc;  
         fileChooser.ensureFileIsVisible(f);
     }
 

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=495957&r1=495956&r2=495957
==============================================================================
--- 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
Sat Jan 13 11:50:22 2007
@@ -164,4 +164,14 @@
         ui.installUI(fc);
         assertNull(ui.getPreferredSize(fc));
     }
+
+    public void testEnsureFileIsVisible() {
+        try {   
+            BasicFileChooserUI fc = new BasicFileChooserUI(null);  
+            fc.ensureFileIsVisible(new JFileChooser(), new File("a")); 
+            // PASSED
+        } catch (NullPointerException npe) {     
+            fail("NPE should not be thrown");            
+        }
+    }
 }



Mime
View raw message