Darn it! I saw that in there when I first looked at the code and thought
about changing it and then shifted gears into other related stuff and forgot
about. Thanks Stefan.
But can't we use JDK 1.2+ API's in optional tasks? (not that this is a big
deal just for an ArrayList)
Erik
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 11:46 AM
Subject: cvs commit:
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/j2ee
ServerDeploy.java
> bodewig 02/03/27 08:46:41
>
> Modified: src/main/org/apache/tools/ant/taskdefs/optional/j2ee
> ServerDeploy.java
> Log:
> JDK 1.1
>
> Revision Changes Path
> 1.2 +8 -7
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeplo
y.java
>
> Index: ServerDeploy.java
> ===================================================================
> RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/S
erverDeploy.java,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -u -r1.1 -r1.2
> --- ServerDeploy.java 27 Mar 2002 14:32:19 -0000 1.1
> +++ ServerDeploy.java 27 Mar 2002 16:46:41 -0000 1.2
> @@ -55,8 +55,8 @@
> package org.apache.tools.ant.taskdefs.optional.j2ee;
>
> import java.io.File;
> -import java.util.ArrayList;
> -import java.util.Iterator;
> +import java.util.Vector;
> +import java.util.Enumeration;
>
> import org.apache.tools.ant.BuildException;
> import org.apache.tools.ant.Task;
> @@ -83,7 +83,7 @@
> private File source;
>
> /** The vendor specific tool for deploying the component **/
> - private ArrayList vendorTools = new ArrayList();
> + private Vector vendorTools = new Vector();
>
>
///////////////////////////////////////////////////////////////////////////
> //
> @@ -99,7 +99,7 @@
> */
> public void addGeneric(GenericHotDeploymentTool tool) {
> tool.setTask(this);
> - vendorTools.add(tool);
> + vendorTools.addElement(tool);
> }
>
> /**
> @@ -110,7 +110,7 @@
> */
> public void addWeblogic(WebLogicHotDeploymentTool tool) {
> tool.setTask(this);
> - vendorTools.add(tool);
> + vendorTools.addElement(tool);
> }
>
>
///////////////////////////////////////////////////////////////////////////
> @@ -128,8 +128,9 @@
> * a failure occurs in the deployment process.
> */
> public void execute() throws BuildException {
> - for (Iterator iterator = vendorTools.iterator();
iterator.hasNext();) {
> - HotDeploymentTool tool = (HotDeploymentTool)
iterator.next();
> + for (Enumeration enum = vendorTools.elements();
> + enum.hasMoreElements();) {
> + HotDeploymentTool tool = (HotDeploymentTool)
enum.nextElement();
> tool.validateAttributes();
> tool.deploy();
> }
>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>