From 05b68e21f02fc96afdac64432894f46ab153078d Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Thu, 14 Sep 2006 17:18:02 +0000 Subject: [PATCH] formatting; Enumeration->Iterator why not? git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@443419 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/taskdefs/Sequential.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Sequential.java b/src/main/org/apache/tools/ant/taskdefs/Sequential.java index 36d3ad271..6ef641bf8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Sequential.java +++ b/src/main/org/apache/tools/ant/taskdefs/Sequential.java @@ -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.

- + * * @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(); } }