tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1187232 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
Date Fri, 21 Oct 2011 09:15:38 GMT
Author: olamy
Date: Fri Oct 21 09:15:37 2011
New Revision: 1187232

URL: http://svn.apache.org/viewvc?rev=1187232&view=rev
Log:
prefer Set to prevent duplicate entries

Modified:
    tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java

Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java?rev=1187232&r1=1187231&r2=1187232&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
(original)
+++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
Fri Oct 21 09:15:37 2011
@@ -38,7 +38,9 @@ import java.io.FilenameFilter;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 /**
  * @author Olivier Lamy
@@ -56,7 +58,8 @@ public class DefaultClassLoaderEntriesCa
     public List<String> calculateClassPathEntries( ClassLoaderEntriesCalculatorRequest
request )
         throws TomcatRunException
     {
-        List<String> classLoaderEntries = new ArrayList<String>();
+        Set<String> classLoaderEntries = new HashSet<String>();
+        //List<String> classLoaderEntries = new ArrayList<String>( );
         // add classes directories to loader
 
         try
@@ -158,7 +161,8 @@ public class DefaultClassLoaderEntriesCa
                 }
             }
         }
-        return classLoaderEntries;
+        return new ArrayList<String>( classLoaderEntries );
+        //return classLoaderEntries;
     }
 
     private void deleteDirectory( File directory, Log log )



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


Mime
View raw message