harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r599546 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/filechooser/FileSystemView.java test/api/java.injected/javax/swing/filechooser/FileSystemViewTest.java
Date Thu, 29 Nov 2007 19:10:43 GMT
Author: apetrenko
Date: Thu Nov 29 11:10:42 2007
New Revision: 599546

URL: http://svn.apache.org/viewvc?rev=599546&view=rev
Log:
Patch for HARMONY-5211 "[classlib][swing] The <public boolean 
isFileSystemRoot(File dir)> method in the FileSystemView class in Java 
Swing will always return false."

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/filechooser/FileSystemViewTest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java?rev=599546&r1=599545&r2=599546&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java
Thu Nov 29 11:10:42 2007
@@ -349,7 +349,7 @@
     public boolean isFileSystemRoot(final File dir) {
         File[] roots = File.listRoots();
         for (int i = 0; i < roots.length; i++) {
-            if (roots.equals(dir)) {
+            if (roots[i].equals(dir)) {
                 return true;
             }
         }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/filechooser/FileSystemViewTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/filechooser/FileSystemViewTest.java?rev=599546&r1=599545&r2=599546&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/filechooser/FileSystemViewTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/filechooser/FileSystemViewTest.java
Thu Nov 29 11:10:42 2007
@@ -144,6 +144,12 @@
             dir.delete();
         }
     }
+    
+    public void testHarmony5211() {
+        File []roots = File.listRoots();
+        for (int i = 0; i < roots.length; i++)
+            assertTrue(view.isFileSystemRoot(roots[i]));
+    }
 
     private static void assertNotEmpty(final String name) {
         assertNotNull(name);



Mime
View raw message