[jboss-cvs] JBossAS SVN: r95680 - projects/jboss-cl/trunk/classloader/src/main/java/org/jboss/classloader/test/support.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 28 09:56:57 EDT 2009
Author: alesj
Date: 2009-10-28 09:56:56 -0400 (Wed, 28 Oct 2009)
New Revision: 95680
Modified:
projects/jboss-cl/trunk/classloader/src/main/java/org/jboss/classloader/test/support/IsolatedClassLoaderTestHelper.java
Log:
Use addAll instead of iter + add.
Modified: projects/jboss-cl/trunk/classloader/src/main/java/org/jboss/classloader/test/support/IsolatedClassLoaderTestHelper.java
===================================================================
--- projects/jboss-cl/trunk/classloader/src/main/java/org/jboss/classloader/test/support/IsolatedClassLoaderTestHelper.java 2009-10-28 13:33:56 UTC (rev 95679)
+++ projects/jboss-cl/trunk/classloader/src/main/java/org/jboss/classloader/test/support/IsolatedClassLoaderTestHelper.java 2009-10-28 13:56:56 UTC (rev 95680)
@@ -28,6 +28,7 @@
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
+import java.util.Arrays;
import junit.extensions.TestSetup;
import junit.framework.Test;
@@ -165,8 +166,7 @@
MockClassLoaderPolicy policy = new MockClassLoaderPolicy();
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(clazz);
- for (Class<?> c : packages)
- classes.add(c);
+ classes.addAll(Arrays.asList(packages));
policy.setImportAll(importAll);
policy.setPathsAndPackageNames(classes.toArray(new Class[classes.size()]));
@@ -245,8 +245,7 @@
MockClassLoaderPolicy policy = new MockClassLoaderPolicy();
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(clazz);
- for (Class<?> c : packages)
- classes.add(c);
+ classes.addAll(Arrays.asList(packages));
policy.setImportAll(importAll);
policy.setPathsAndPackageNames(classes.toArray(new Class[classes.size()]));
return initializeClassLoader(clazz, parentFilter, policy);
More information about the jboss-cvs-commits
mailing list