former was never tested. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275593 13f79535-47bb-0310-9956-ffa450edef68master
@@ -10,11 +10,11 @@ | |||||
<h2><a name="macrodef">MacroDef</a></h2> | <h2><a name="macrodef">MacroDef</a></h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p> | <p> | ||||
This defines a new task using a <sequential> or <parallel> | |||||
This defines a new task using a <sequential> | |||||
nested task as a template. Nested elements <attribute> and | nested task as a template. Nested elements <attribute> and | ||||
<element> are used to specify attributes and elements of | <element> are used to specify attributes and elements of | ||||
the new task. These get substituted into the <sequential> | the new task. These get substituted into the <sequential> | ||||
or <parallel> task when the new task is run. | |||||
task when the new task is run. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
<em>since Ant 1.6</em> | <em>since Ant 1.6</em> | ||||
@@ -96,12 +96,11 @@ public class MacroDef extends AntlibDefinition implements TaskContainer { | |||||
*/ | */ | ||||
public void addTask(Task nestedTask) { | public void addTask(Task nestedTask) { | ||||
if (this.nestedTask != null) { | if (this.nestedTask != null) { | ||||
throw new BuildException("Only one sequential/Parallel allowed"); | |||||
throw new BuildException("Only one sequential allowed"); | |||||
} | } | ||||
UnknownElement ue = (UnknownElement) nestedTask; | UnknownElement ue = (UnknownElement) nestedTask; | ||||
if (!ue.getNamespace().equals("") | if (!ue.getNamespace().equals("") | ||||
|| (!ue.getTag().equals("sequential") | |||||
&& !ue.getTag().equals("parallel"))) { | |||||
|| !ue.getTag().equals("sequential")) { | |||||
throw new BuildException("Unsupported tag " + ue.getQName()); | throw new BuildException("Unsupported tag " + ue.getQName()); | ||||
} | } | ||||
this.nestedTask = ue; | this.nestedTask = ue; | ||||