ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r695389 - /ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
Date Mon, 15 Sep 2008 09:12:42 GMT
Author: bodewig
Date: Mon Sep 15 02:12:40 2008
New Revision: 695389

URL: http://svn.apache.org/viewvc?rev=695389&view=rev
Log:
tiny optimization

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=695389&r1=695388&r2=695389&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java Mon Sep 15 02:12:40
2008
@@ -1850,8 +1850,9 @@
                     if (dirName.equals(dir)) {
                         f = FILE_UTILS.resolveFile(parent, relPath + dir);
                         files.add(getCanonicalPath(f));
-                        if (CollectionUtils.frequency(files, target)
-                            > maxLevelsOfSymlinks) {
+                        if (files.size() > maxLevelsOfSymlinks
+                            && CollectionUtils.frequency(files, target)
+                                 > maxLevelsOfSymlinks) {
                             return true;
                         }
                     }



Mime
View raw message