You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2011/10/31 18:56:00 UTC

svn commit: r1195584 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java

Author: ggregory
Date: Mon Oct 31 17:56:00 2011
New Revision: 1195584

URL: http://svn.apache.org/viewvc?rev=1195584&view=rev
Log:
Use Java 5 enhanced loops.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1195584&r1=1195583&r2=1195584&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java Mon Oct 31 17:56:00 2011
@@ -1064,11 +1064,8 @@ public abstract class AbstractFileObject
         file.findFiles(selector, false, files);
 
         // Copy everything across
-        final int count = files.size();
-        for (int i = 0; i < count; i++)
+        for (FileObject srcFile : files)
         {
-            final FileObject srcFile = files.get(i);
-
             // Determine the destination file
             final String relPath = file.getName().getRelativeName(srcFile.getName());
             final FileObject destFile = resolveFile(relPath, NameScope.DESCENDENT_OR_SELF);