Browse Source

Remove option to have parallel instead of sequential for macrodef. The

former was never tested.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275593 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
77be27b180
2 changed files with 4 additions and 5 deletions
  1. +2
    -2
      docs/manual/CoreTasks/macrodef.html
  2. +2
    -3
      src/main/org/apache/tools/ant/taskdefs/MacroDef.java

+ 2
- 2
docs/manual/CoreTasks/macrodef.html View File

@@ -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 &lt;sequential&gt; or &lt;parallel&gt;
This defines a new task using a &lt;sequential&gt;
nested task as a template. Nested elements &lt;attribute&gt; and nested task as a template. Nested elements &lt;attribute&gt; and
&lt;element&gt; are used to specify attributes and elements of &lt;element&gt; are used to specify attributes and elements of
the new task. These get substituted into the &lt;sequential&gt; the new task. These get substituted into the &lt;sequential&gt;
or &lt;parallel&gt; 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>


+ 2
- 3
src/main/org/apache/tools/ant/taskdefs/MacroDef.java View File

@@ -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;


Loading…
Cancel
Save