harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r519272 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java
Date Sat, 17 Mar 2007 09:34:30 GMT
Author: apetrenko
Date: Sat Mar 17 02:34:29 2007
New Revision: 519272

URL: http://svn.apache.org/viewvc?view=rev&rev=519272
Log:
This patch is a correct fix for HARMONY-2606 "[classlib][swing][plaf] javax.swing.plaf.basic.BasicFileChooserUI.ensureFileIsVisible(..)
throws unexpected NPE" and it also removes a regression introduced by previous patch

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.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=519272&r1=519271&r2=519272
==============================================================================
--- 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 Mar 17 02:34:29 2007
@@ -617,8 +617,9 @@
     }
 
     public void ensureFileIsVisible(final JFileChooser fc, final File f) {
-        fileChooser = fc;  
-        fileChooser.ensureFileIsVisible(f);
+        if (fileChooser != null) {  
+            fileChooser.ensureFileIsVisible(f);
+        }
     }
 
     public JFileChooser getFileChooser() {



Mime
View raw message