Browse Source

formatting; Enumeration->Iterator why not?

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@443419 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
05b68e21f0
1 changed files with 5 additions and 8 deletions
  1. +5
    -8
      src/main/org/apache/tools/ant/taskdefs/Sequential.java

+ 5
- 8
src/main/org/apache/tools/ant/taskdefs/Sequential.java View File

@@ -17,14 +17,12 @@
*/
package org.apache.tools.ant.taskdefs;

import java.util.Enumeration;
import java.util.Iterator;
import java.util.Vector;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.TaskContainer;



/**
* Sequential is a container task - it can contain other Ant tasks. The nested
* tasks are simply executed in sequence. Sequential's primary use is to support
@@ -34,12 +32,11 @@ import org.apache.tools.ant.TaskContainer;
* The sequential task has no attributes and does not support any nested
* elements apart from Ant tasks. Any valid Ant task may be embedded within the
* sequential task.</p>
*
* @since Ant 1.4
* @ant.task category="control"
*/
public class Sequential extends Task
implements TaskContainer {
public class Sequential extends Task implements TaskContainer {

/** Optional Vector holding the nested tasks */
private Vector nestedTasks = new Vector();
@@ -60,8 +57,8 @@ public class Sequential extends Task
* @throws BuildException if one of the nested tasks fails.
*/
public void execute() throws BuildException {
for (Enumeration e = nestedTasks.elements(); e.hasMoreElements();) {
Task nestedTask = (Task) e.nextElement();
for (Iterator i = nestedTasks.iterator(); i.hasNext();) {
Task nestedTask = (Task) i.next();
nestedTask.perform();
}
}


Loading…
Cancel
Save