ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r360158 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
Date Fri, 30 Dec 2005 20:02:57 GMT
Author: mbenson
Date: Fri Dec 30 12:02:55 2005
New Revision: 360158

URL: http://svn.apache.org/viewcvs?rev=360158&view=rev
Log:
list->set in GenericDeploymentTool per PR# 37775. Submitted by Dave Brosius
+ a small modification.

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java?rev=360158&r1=360157&r2=360158&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
Fri Dec 30 12:02:55 2005
@@ -21,15 +21,17 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.ArrayList;
 import java.util.Enumeration;
+import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
-import java.util.List;
+import java.util.Set;
 import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
 import java.util.zip.ZipEntry;
+
 import javax.xml.parsers.SAXParser;
+
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.Location;
@@ -108,9 +110,9 @@
     private ClassLoader classpathLoader = null;
 
      /**
-     * List of files have been loaded into the EJB jar
+     * Set of files have been loaded into the EJB jar
      */
-    private List addedfiles;
+    private Set addedfiles;
 
     /**
      * Handler used to parse the EJB XML descriptor
@@ -736,8 +738,12 @@
 
         JarOutputStream jarStream = null;
         try {
-            // clean the addedfiles Vector
-            addedfiles = new ArrayList();
+            // clean the addedfiles set
+            if (addedfiles == null) {
+                addedfiles = new HashSet();
+            } else {
+                addedfiles.clear();
+            }
 
             /* If the jarfile already exists then whack it and recreate it.
              * Should probably think of a more elegant way to handle this



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message