Browse Source

empty collection != no collection - found by Gump and the jline build

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@292420 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
af6780ed14
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/main/org/apache/tools/ant/taskdefs/Expand.java

+ 3
- 1
src/main/org/apache/tools/ant/taskdefs/Expand.java View File

@@ -62,6 +62,7 @@ public class Expand extends Task {
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 @@ public class Expand extends Task {
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 @@ public class Expand extends Task {
* @since Ant 1.7
*/
public void add(ResourceCollection rc) {
resourcesSpecified = true;
resources.add(rc);
}



Loading…
Cancel
Save