Browse Source

list->set in GenericDeploymentTool per PR# 37775. Submitted by Dave Brosius

+ a small modification.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@360158 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
005e538b5a
1 changed files with 12 additions and 6 deletions
  1. +12
    -6
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java

+ 12
- 6
src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java View File

@@ -21,15 +21,17 @@ import java.io.FileInputStream;
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 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
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 @@ public class GenericDeploymentTool implements EJBDeploymentTool {

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


Loading…
Cancel
Save