diff --git a/proposal/mutant/build/ant1compat.xml b/proposal/mutant/build/ant1compat.xml
index 1f7437701..3b96ae443 100644
--- a/proposal/mutant/build/ant1compat.xml
+++ b/proposal/mutant/build/ant1compat.xml
@@ -90,10 +90,6 @@
unless="jdk1.2+" />
-
-
+
+
+ Kaffe for example -->
@@ -136,10 +135,6 @@
-
-
-
-
-
@@ -185,6 +174,8 @@
unless="bcel.present" />
+
-
+
+
+
+
+
+
@@ -323,9 +318,13 @@
-
+
+
+
+
+
+
@@ -350,9 +349,13 @@
-
+
+
+
+
+
+
@@ -407,7 +410,8 @@
-
+
+
diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib/AntLibManager.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib/AntLibManager.java
index e361b95df..cb25c8a68 100644
--- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib/AntLibManager.java
+++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib/AntLibManager.java
@@ -161,7 +161,7 @@ public class AntLibManager {
throws ExecutionException {
// check if any already defined
- for (Iterator i = librarySpecs.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = librarySpecs.keySet().iterator(); i.hasNext();) {
String libraryId = (String)i.next();
if (libraries.containsKey(libraryId)) {
AntLibrary currentVersion
@@ -174,7 +174,7 @@ public class AntLibManager {
CircularDependencyChecker configuring
= new CircularDependencyChecker("configuring Ant libraries");
- for (Iterator i = librarySpecs.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = librarySpecs.keySet().iterator(); i.hasNext();) {
String libraryId = (String)i.next();
if (!libraries.containsKey(libraryId)) {
configLibrary(initConfig, librarySpecs, libraryId,
@@ -309,7 +309,7 @@ public class AntLibManager {
}
}
- for (Iterator i = urlsList.iterator(); i.hasNext(); ) {
+ for (Iterator i = urlsList.iterator(); i.hasNext();) {
antLibrary.addLibraryURL((URL)i.next());
}
if (extendsId != null) {
@@ -322,7 +322,7 @@ public class AntLibManager {
List libPaths = (List)libPathsMap.get(libraryId);
if (libPaths != null) {
- for (Iterator j = libPaths.iterator(); j.hasNext(); ) {
+ for (Iterator j = libPaths.iterator(); j.hasNext();) {
URL pathURL = (URL)j.next();
addLibPath(antLibrary, pathURL);
}
diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/BuildEventSupport.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/BuildEventSupport.java
index 0a9275755..9dcb0dc9a 100644
--- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/BuildEventSupport.java
+++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/BuildEventSupport.java
@@ -115,7 +115,7 @@ public class BuildEventSupport implements DemuxOutputReceiver {
*/
public void fireBuildStarted(ModelElement element) {
BuildEvent event = new BuildEvent(element, BuildEvent.BUILD_STARTED);
- for (Iterator i = listeners.iterator(); i.hasNext(); ) {
+ for (Iterator i = listeners.iterator(); i.hasNext();) {
BuildListener listener = (BuildListener)i.next();
listener.buildStarted(event);
}
@@ -131,7 +131,7 @@ public class BuildEventSupport implements DemuxOutputReceiver {
Throwable cause) {
BuildEvent event = new BuildEvent(element, BuildEvent.BUILD_FINISHED,
cause);
- for (Iterator i = listeners.iterator(); i.hasNext(); ) {
+ for (Iterator i = listeners.iterator(); i.hasNext();) {
BuildListener listener = (BuildListener)i.next();
listener.buildFinished(event);
}
@@ -144,7 +144,7 @@ public class BuildEventSupport implements DemuxOutputReceiver {
*/
public void fireTargetStarted(ModelElement element) {
BuildEvent event = new BuildEvent(element, BuildEvent.TARGET_STARTED);
- for (Iterator i = listeners.iterator(); i.hasNext(); ) {
+ for (Iterator i = listeners.iterator(); i.hasNext();) {
BuildListener listener = (BuildListener)i.next();
listener.targetStarted(event);
}
@@ -160,7 +160,7 @@ public class BuildEventSupport implements DemuxOutputReceiver {
Throwable cause) {
BuildEvent event = new BuildEvent(element, BuildEvent.TARGET_FINISHED,
cause);
- for (Iterator i = listeners.iterator(); i.hasNext(); ) {
+ for (Iterator i = listeners.iterator(); i.hasNext();) {
BuildListener listener = (BuildListener)i.next();
listener.targetFinished(event);
}
@@ -176,7 +176,7 @@ public class BuildEventSupport implements DemuxOutputReceiver {
threadTasks.put(Thread.currentThread(), task);
}
BuildEvent event = new BuildEvent(task, BuildEvent.TASK_STARTED);
- for (Iterator i = listeners.iterator(); i.hasNext(); ) {
+ for (Iterator i = listeners.iterator(); i.hasNext();) {
BuildListener listener = (BuildListener)i.next();
listener.taskStarted(event);
}
@@ -197,7 +197,7 @@ public class BuildEventSupport implements DemuxOutputReceiver {
}
BuildEvent event = new BuildEvent(task, BuildEvent.TASK_FINISHED,
cause);
- for (Iterator i = listeners.iterator(); i.hasNext(); ) {
+ for (Iterator i = listeners.iterator(); i.hasNext();) {
BuildListener listener = (BuildListener)i.next();
listener.taskFinished(event);
}
@@ -213,7 +213,7 @@ public class BuildEventSupport implements DemuxOutputReceiver {
public void fireMessageLogged(Object source,
String message, int priority) {
BuildEvent event = new BuildEvent(source, message, priority);
- for (Iterator i = listeners.iterator(); i.hasNext(); ) {
+ for (Iterator i = listeners.iterator(); i.hasNext();) {
BuildListener listener = (BuildListener)i.next();
listener.messageLogged(event);
}
diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java
index 09ff7190b..0987cd719 100644
--- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java
+++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java
@@ -245,7 +245,7 @@ public class ComponentManager implements ComponentService {
throw new ExecutionException("Unable to import library " + libraryId
+ " as it has not been loaded");
}
- for (Iterator i = library.getDefinitionNames(); i.hasNext(); ) {
+ for (Iterator i = library.getDefinitionNames(); i.hasNext();) {
String defName = (String)i.next();
importLibraryDef(library, defName, null);
}
@@ -360,7 +360,7 @@ public class ComponentManager implements ComponentService {
antLibraries = new HashMap(standardLibs);
// go through the libraries and import all standard ant libraries
- for (Iterator i = antLibraries.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = antLibraries.keySet().iterator(); i.hasNext();) {
String libraryId = (String)i.next();
if (libraryId.startsWith(Constants.ANT_LIB_PREFIX)) {
// standard library - import whole library
@@ -805,7 +805,7 @@ public class ComponentManager implements ComponentService {
throws ExecutionException {
Setter setter = getSetter(element.getClass());
// start by setting the attributes of this element
- for (Iterator i = model.getAttributeNames(); i.hasNext(); ) {
+ for (Iterator i = model.getAttributeNames(); i.hasNext();) {
String attributeName = (String)i.next();
String attributeValue = model.getAttributeValue(attributeName);
if (!setter.supportsAttribute(attributeName)) {
@@ -828,7 +828,7 @@ public class ComponentManager implements ComponentService {
}
// now do the nested elements
- for (Iterator i = model.getNestedElements(); i.hasNext(); ) {
+ for (Iterator i = model.getNestedElements(); i.hasNext();) {
BuildElement nestedElementModel = (BuildElement)i.next();
String nestedElementName = nestedElementModel.getType();
ImportInfo info = getDefinition(nestedElementName);
@@ -901,7 +901,7 @@ public class ComponentManager implements ComponentService {
try {
AntLibFactory libFactory = getLibFactory(library);
ClassLoader converterLoader = library.getClassLoader();
- for (Iterator i = library.getConverterClassNames(); i.hasNext(); ) {
+ for (Iterator i = library.getConverterClassNames(); i.hasNext();) {
className = (String)i.next();
Class converterClass
= Class.forName(className, true, converterLoader);
diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionManager.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionManager.java
index c58278a12..df2dde1ae 100755
--- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionManager.java
+++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionManager.java
@@ -136,7 +136,7 @@ public class ExecutionManager implements DemuxOutputReceiver {
librarySpecs.clear();
// add any additional libraries.
- for (Iterator i = config.getLibraryLocations(); i.hasNext(); ) {
+ for (Iterator i = config.getLibraryLocations(); i.hasNext();) {
// try file first
String libLocation = (String)i.next();
libManager.loadLibs(librarySpecs, libLocation);
@@ -168,7 +168,7 @@ public class ExecutionManager implements DemuxOutputReceiver {
project.validate();
mainFrame = new Frame(antLibraries, initConfig, config);
- for (Iterator j = eventSupport.getListeners(); j.hasNext(); ) {
+ for (Iterator j = eventSupport.getListeners(); j.hasNext();) {
BuildListener listener = (BuildListener)j.next();
mainFrame.addBuildListener(listener);
}
diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java
index c29a8f495..0c301c3c3 100644
--- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java
+++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java
@@ -187,7 +187,7 @@ public class Frame implements DemuxOutputReceiver {
this.project = project;
referencedFrames = new HashMap();
- for (Iterator i = project.getReferencedProjectNames(); i.hasNext(); ) {
+ for (Iterator i = project.getReferencedProjectNames(); i.hasNext();) {
String referenceName = (String)i.next();
Project referencedProject
= project.getReferencedProject(referenceName);
@@ -507,7 +507,7 @@ public class Frame implements DemuxOutputReceiver {
* @exception ExecutionException if the frame cannot be created.
*/
protected void addProperties(Map properties) throws ExecutionException {
- for (Iterator i = properties.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = properties.keySet().iterator(); i.hasNext();) {
String name = (String)i.next();
Object value = properties.get(name);
setDataValue(name, value, false);
@@ -526,7 +526,7 @@ public class Frame implements DemuxOutputReceiver {
Frame newFrame
= new Frame(standardLibs, initConfig, config);
newFrame.setProject(project);
- for (Iterator j = eventSupport.getListeners(); j.hasNext(); ) {
+ for (Iterator j = eventSupport.getListeners(); j.hasNext();) {
BuildListener listener = (BuildListener)j.next();
newFrame.addBuildListener(listener);
}
@@ -549,7 +549,7 @@ public class Frame implements DemuxOutputReceiver {
* @param listener the listener to be added to the frame
*/
protected void addBuildListener(BuildListener listener) {
- for (Iterator i = getReferencedFrames(); i.hasNext(); ) {
+ for (Iterator i = getReferencedFrames(); i.hasNext();) {
Frame referencedFrame = (Frame)i.next();
referencedFrame.addBuildListener(listener);
}
@@ -562,7 +562,7 @@ public class Frame implements DemuxOutputReceiver {
* @param listener the listener to be removed
*/
protected void removeBuildListener(BuildListener listener) {
- for (Iterator i = getReferencedFrames(); i.hasNext(); ) {
+ for (Iterator i = getReferencedFrames(); i.hasNext();) {
Frame subFrame = (Frame)i.next();
subFrame.removeBuildListener(listener);
}
@@ -588,7 +588,7 @@ public class Frame implements DemuxOutputReceiver {
executeTarget(defaultTarget);
}
} else {
- for (Iterator i = targets.iterator(); i.hasNext(); ) {
+ for (Iterator i = targets.iterator(); i.hasNext();) {
String targetName = (String)i.next();
log("Executing target: " + targetName, MessageLevel.MSG_DEBUG);
executeTarget(targetName);
@@ -611,7 +611,7 @@ public class Frame implements DemuxOutputReceiver {
try {
// firstly build a list of fully qualified target names to execute.
List dependencyOrder = project.getTargetDependencies(targetName);
- for (Iterator i = dependencyOrder.iterator(); i.hasNext(); ) {
+ for (Iterator i = dependencyOrder.iterator(); i.hasNext();) {
String fullTargetName = (String)i.next();
Frame frame = getContainingFrame(fullTargetName);
String localTargetName = getNameInFrame(fullTargetName);
@@ -717,7 +717,7 @@ public class Frame implements DemuxOutputReceiver {
* failed
*/
protected void initialize() throws ExecutionException {
- for (Iterator i = getReferencedFrames(); i.hasNext(); ) {
+ for (Iterator i = getReferencedFrames(); i.hasNext();) {
Frame referencedFrame = (Frame)i.next();
referencedFrame.initialize();
}
@@ -765,7 +765,7 @@ public class Frame implements DemuxOutputReceiver {
}
setDataValue(MagicProperties.BASEDIR, baseDir.getAbsolutePath(), true);
- for (Iterator i = getReferencedFrames(); i.hasNext(); ) {
+ for (Iterator i = getReferencedFrames(); i.hasNext();) {
Frame refFrame = (Frame)i.next();
refFrame.determineBaseDirs();
}
diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Reflector.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Reflector.java
index 2a2d14783..e43bfe565 100755
--- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Reflector.java
+++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Reflector.java
@@ -415,7 +415,7 @@ public class Reflector implements Setter {
if (converters != null) {
// desparate by now - try top find a converter which handles a super
// class of this type and which supports subclass instantiation
- for (Iterator i = converters.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = converters.keySet().iterator(); i.hasNext();) {
Class converterType = (Class)i.next();
if (converterType.isAssignableFrom(type)) {
// could be a candidate
diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java
index be7dbe859..3b01de7bd 100644
--- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java
+++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java
@@ -88,7 +88,7 @@ public class BuildElementHandler extends ModelElementHandler {
= new BuildElement(getLocation(), elementName);
setModelElement(buildElement);
- for (Iterator i = getAttributes(); i.hasNext(); ) {
+ for (Iterator i = getAttributes(); i.hasNext();) {
String attributeName = (String)i.next();
buildElement.addAttribute(attributeName,
getAttribute(attributeName));
diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java
index 53d0d77fa..a74e7abe4 100644
--- a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java
+++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java
@@ -472,7 +472,7 @@ public class Project implements org.apache.ant.common.event.BuildListener {
public Hashtable getProperties() {
Map properties = dataService.getAllProperties();
Hashtable result = new Hashtable();
- for (Iterator i = properties.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = properties.keySet().iterator(); i.hasNext();) {
String name = (String)i.next();
Object value = properties.get(name);
if (value instanceof String) {
@@ -500,7 +500,7 @@ public class Project implements org.apache.ant.common.event.BuildListener {
public Hashtable getReferences() {
Map properties = dataService.getAllProperties();
Hashtable result = new Hashtable();
- for (Iterator i = properties.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = properties.keySet().iterator(); i.hasNext();) {
String name = (String)i.next();
Object value = properties.get(name);
if (!(value instanceof String)) {
diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/ProjectComponent.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/ProjectComponent.java
index a6571655f..964c1e0cc 100644
--- a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/ProjectComponent.java
+++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/ProjectComponent.java
@@ -65,8 +65,6 @@ import org.apache.ant.common.util.ExecutionException;
public abstract class ProjectComponent {
/** The project in which the project component operates */
protected Project project;
- /** The location within the build file of this project component */
- protected Location location;
/** The core context for this component */
private AntContext context;
/** The type of the component bneing created */
@@ -82,15 +80,6 @@ public abstract class ProjectComponent {
this.project = project;
}
- /**
- * Sets the file location where this task was defined.
- *
- * @param location the new location value
- */
- public void setLocation(Location location) {
- this.location = location;
- }
-
/**
* Gets the project of the ProjectComponent
*
@@ -100,16 +89,6 @@ public abstract class ProjectComponent {
return project;
}
- /**
- * Gets the location of the ProjectComponent's associated model element
- * in the build file
- *
- * @return the location of the associated model element
- */
- public Location getLocation() {
- return location;
- }
-
/**
* Gets the componentType of the ProjectComponent
*
@@ -141,17 +120,6 @@ public abstract class ProjectComponent {
this.context = context;
this.componentType = componentType;
- org.apache.ant.common.util.Location contextLocation
- = context.getLocation();
-
- if (contextLocation
- == org.apache.ant.common.util.Location.UNKNOWN_LOCATION) {
- location = Location.UNKNOWN_LOCATION;
- } else {
- location = new Location(contextLocation.getSource(),
- contextLocation.getLineNumber(),
- contextLocation.getColumnNumber());
- }
}
/**
diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java
index e79e76c36..4de4e4714 100644
--- a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java
+++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java
@@ -73,6 +73,8 @@ public abstract class Task extends ProjectComponent
protected String taskType = null;
/** The description of this task */
protected String description = null;
+ /** The location within the build file of this project component */
+ protected Location location;
/**
* Called by the project to let the task do its work. This method may be
@@ -142,6 +144,16 @@ public abstract class Task extends ProjectComponent
return description;
}
+ /**
+ * Gets the location of the ProjectComponent's associated model element
+ * in the build file
+ *
+ * @return the location of the associated model element
+ */
+ public Location getLocation() {
+ return location;
+ }
+
/**
* Add a nested task to this Ant1 task.
@@ -181,6 +193,18 @@ public abstract class Task extends ProjectComponent
taskType = componentType;
taskName = componentType;
+
+ org.apache.ant.common.util.Location contextLocation
+ = context.getLocation();
+
+ if (contextLocation
+ == org.apache.ant.common.util.Location.UNKNOWN_LOCATION) {
+ location = Location.UNKNOWN_LOCATION;
+ } else {
+ location = new Location(contextLocation.getSource(),
+ contextLocation.getLineNumber(),
+ contextLocation.getColumnNumber());
+ }
init();
}
@@ -257,5 +281,15 @@ public abstract class Task extends ProjectComponent
void setTaskType(String type) {
this.taskType = type;
}
+
+ /**
+ * Sets the file location where this task was defined.
+ *
+ * @param location the new location value
+ */
+ public void setLocation(Location location) {
+ this.location = location;
+ }
+
}
diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java
index b00b5c4a8..91f0354f8 100644
--- a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java
+++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java
@@ -162,7 +162,7 @@ public class Ant extends Task {
* problem
*/
public void execute() throws BuildException {
- for (Iterator i = properties.iterator(); i.hasNext(); ) {
+ for (Iterator i = properties.iterator(); i.hasNext();) {
Property property = (Property)i.next();
AntBase.Property newProperty = new AntBase.Property();
newProperty.setName(property.getName());
diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java
index 86dcc42f5..ceab8c6cc 100644
--- a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java
+++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java
@@ -111,7 +111,7 @@ public class CallTarget extends Task {
/** execute the call */
public void execute() {
- for (Iterator i = properties.iterator(); i.hasNext(); ) {
+ for (Iterator i = properties.iterator(); i.hasNext();) {
Property property = (Property)i.next();
AntBase.Property newProperty = new AntBase.Property();
newProperty.setName(property.getName());
diff --git a/proposal/mutant/src/java/antlibs/script/org/apache/ant/antlib/script/ScriptBase.java b/proposal/mutant/src/java/antlibs/script/org/apache/ant/antlib/script/ScriptBase.java
index 80a767fa3..299d40be9 100644
--- a/proposal/mutant/src/java/antlibs/script/org/apache/ant/antlib/script/ScriptBase.java
+++ b/proposal/mutant/src/java/antlibs/script/org/apache/ant/antlib/script/ScriptBase.java
@@ -128,7 +128,7 @@ public class ScriptBase extends AbstractTask implements DeferredTask {
BSFEngine engine = manager.loadScriptingEngine(language);
engine.exec(scriptName, 0, 0, script);
- for (Iterator i = attributes.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = attributes.keySet().iterator(); i.hasNext();) {
String attributeName = (String)i.next();
String value = (String)attributes.get(attributeName);
StringBuffer setter = new StringBuffer(attributeName);
diff --git a/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Sequential.java b/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Sequential.java
index e99fc2279..feb2895ae 100644
--- a/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Sequential.java
+++ b/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Sequential.java
@@ -101,7 +101,7 @@ public class Sequential extends AbstractTask
AntContext context = getAntContext();
ExecService execService
= (ExecService)context.getCoreService(ExecService.class);
- for (Iterator i = nestedTasks.iterator(); i.hasNext(); ) {
+ for (Iterator i = nestedTasks.iterator(); i.hasNext();) {
Task nestedTask = (Task)i.next();
execService.executeTask(nestedTask);
}
diff --git a/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/BuildHelper.java b/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/BuildHelper.java
index 326dc4f8a..e327a29fb 100644
--- a/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/BuildHelper.java
+++ b/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/BuildHelper.java
@@ -173,7 +173,7 @@ public class BuildHelper {
args[index++] = "-classpath";
args[index++] = path;
}
- for (Iterator i = javaFiles.iterator(); i.hasNext(); ) {
+ for (Iterator i = javaFiles.iterator(); i.hasNext();) {
args[index++] = ((File)i.next()).getPath();
}
diff --git a/proposal/mutant/src/java/cli/org/apache/ant/cli/Commandline.java b/proposal/mutant/src/java/cli/org/apache/ant/cli/Commandline.java
index 438ea5108..94c9ec81e 100755
--- a/proposal/mutant/src/java/cli/org/apache/ant/cli/Commandline.java
+++ b/proposal/mutant/src/java/cli/org/apache/ant/cli/Commandline.java
@@ -160,7 +160,7 @@ public class Commandline {
// Add the default listener
execManager.addBuildListener(logger);
- for (Iterator i = listeners.iterator(); i.hasNext(); ) {
+ for (Iterator i = listeners.iterator(); i.hasNext();) {
String className = (String)i.next();
try {
BuildListener listener =
@@ -284,7 +284,7 @@ public class Commandline {
config.merge(userConfig);
}
- for (Iterator i = configFiles.iterator(); i.hasNext(); ) {
+ for (Iterator i = configFiles.iterator(); i.hasNext();) {
File configFile = (File)i.next();
AntConfig runConfig = getAntConfigFile(configFile);
config.merge(runConfig);
diff --git a/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java b/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java
index 83f86cb2e..d06de744e 100644
--- a/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java
+++ b/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java
@@ -113,7 +113,7 @@ public abstract class ModelElement {
*/
public void setAspects(Map aspects) {
aspectMaps = new HashMap();
- for (Iterator i = aspects.keySet().iterator(); i.hasNext(); ) {
+ for (Iterator i = aspects.keySet().iterator(); i.hasNext();) {
String aspectName = (String)i.next();
int separator = aspectName.indexOf(":");
if (separator != -1) {
diff --git a/proposal/mutant/src/java/common/org/apache/ant/common/model/Project.java b/proposal/mutant/src/java/common/org/apache/ant/common/model/Project.java
index 53fe5da58..d0eb3dc18 100644
--- a/proposal/mutant/src/java/common/org/apache/ant/common/model/Project.java
+++ b/proposal/mutant/src/java/common/org/apache/ant/common/model/Project.java
@@ -416,7 +416,7 @@ public class Project extends ModelElement {
targetGlobalName = globalName + REF_DELIMITER + targetName;
}
checker.visitNode(targetGlobalName);
- for (Iterator i = target.getDependencies(); i.hasNext(); ) {
+ for (Iterator i = target.getDependencies(); i.hasNext();) {
String dependency = (String)i.next();
boolean localTarget = (dependency.indexOf(REF_DELIMITER) == -1);
Target dependencyTarget
@@ -459,7 +459,7 @@ public class Project extends ModelElement {
*/
protected void validate(String globalName) throws ModelException {
Set keys = referencedProjects.keySet();
- for (Iterator i = keys.iterator(); i.hasNext(); ) {
+ for (Iterator i = keys.iterator(); i.hasNext();) {
String refName = (String)i.next();
Project referencedProject
= (Project)referencedProjects.get(refName);
@@ -481,7 +481,7 @@ public class Project extends ModelElement {
// dependency order is purely recorded for debug purposes
List dependencyOrder = new ArrayList();
- for (Iterator i = getTargets(); i.hasNext(); ) {
+ for (Iterator i = getTargets(); i.hasNext();) {
Target target = (Target)i.next();
target.validate();
fillinDependencyOrder(globalName, target, dependencyOrder,
@@ -526,7 +526,7 @@ public class Project extends ModelElement {
throw new ConfigException("Target " + fullTargetName
+ " does not exist");
}
- for (Iterator i = target.getDependencies(); i.hasNext(); ) {
+ for (Iterator i = target.getDependencies(); i.hasNext();) {
String localDependencyName = (String)i.next();
String fullDependencyName
= fullProjectName == null ? localDependencyName
diff --git a/proposal/mutant/src/java/common/org/apache/ant/common/util/FileUtils.java b/proposal/mutant/src/java/common/org/apache/ant/common/util/FileUtils.java
index c33d1b0d3..1a79e550d 100644
--- a/proposal/mutant/src/java/common/org/apache/ant/common/util/FileUtils.java
+++ b/proposal/mutant/src/java/common/org/apache/ant/common/util/FileUtils.java
@@ -186,8 +186,7 @@ public class FileUtils {
for (int i = 2; i < ca.length; i++) {
if ((ca[i] != '\\') ||
- (ca[i] == '\\' && ca[i - 1] != '\\')
- ) {
+ (ca[i] == '\\' && ca[i - 1] != '\\')) {
sb.append(ca[i]);
}
}