ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r796169 - /ant/core/trunk/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java
Date Tue, 21 Jul 2009 07:25:13 GMT
Author: bodewig
Date: Tue Jul 21 07:25:12 2009
New Revision: 796169

URL: http://svn.apache.org/viewvc?rev=796169&view=rev
Log:
Java 1.2

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java?rev=796169&r1=796168&r2=796169&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java Tue Jul
21 07:25:12 2009
@@ -18,8 +18,9 @@
 
 package org.apache.tools.ant.util.facade;
 
-import java.util.Enumeration;
-import java.util.Vector;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * Helper class for facade implementations - encapsulates treatment of
@@ -34,7 +35,7 @@
     /**
      * Command line arguments.
      */
-    private Vector args = new Vector();
+    private List args = new ArrayList();
 
     /**
      * The explicitly chosen implementation.
@@ -109,7 +110,7 @@
      * @param arg an argument to add.
      */
     public void addImplementationArgument(ImplementationSpecificArgument arg) {
-        args.addElement(arg);
+        args.add(arg);
     }
 
     /**
@@ -118,18 +119,17 @@
      * @return an array of command line arguements.
      */
     public String[] getArgs() {
-        Vector tmp = new Vector(args.size());
-        for (Enumeration e = args.elements(); e.hasMoreElements();) {
+        List tmp = new ArrayList(args.size());
+        for (Iterator e = args.iterator(); e.hasNext();) {
             ImplementationSpecificArgument arg =
-                ((ImplementationSpecificArgument) e.nextElement());
+                ((ImplementationSpecificArgument) e.next());
             String[] curr = arg.getParts(getImplementation());
             for (int i = 0; i < curr.length; i++) {
-                tmp.addElement(curr[i]);
+                tmp.add(curr[i]);
             }
         }
         String[] res = new String[tmp.size()];
-        tmp.copyInto(res);
-        return res;
+        return (String[]) tmp.toArray(res);
     }
 
     /**



Mime
View raw message