ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r292420 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java
Date Thu, 29 Sep 2005 11:37:21 GMT
Author: bodewig
Date: Thu Sep 29 04:37:19 2005
New Revision: 292420

URL: http://svn.apache.org/viewcvs?rev=292420&view=rev
Log:
empty collection != no collection - found by Gump and the jline build

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

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java?rev=292420&r1=292419&r2=292420&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java Thu Sep 29 04:37:19
2005
@@ -62,6 +62,7 @@
     private Mapper mapperElement = null;
     private Vector patternsets = new Vector();
     private Union resources = new Union();
+    private boolean resourcesSpecified = false;
 
     private static final String NATIVE_ENCODING = "native-encoding";
 
@@ -81,7 +82,7 @@
             log("!! expand is deprecated. Use unzip instead. !!");
         }
 
-        if (source == null && resources.size() == 0) {
+        if (source == null && !resourcesSpecified) {
             throw new BuildException("src attribute and/or resources must be "
                                      + "specified");
         }
@@ -347,6 +348,7 @@
      * @since Ant 1.7
      */
     public void add(ResourceCollection rc) {
+        resourcesSpecified = true;
         resources.add(rc);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message