[jboss-cvs] JBossAS SVN: r95438 - in projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5: jbosscl and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 22 15:24:42 EDT 2009
Author: flavia.rainone at jboss.com
Date: 2009-10-22 15:24:42 -0400 (Thu, 22 Oct 2009)
New Revision: 95438
Modified:
projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5/RegisterModuleCallback.java
projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5/jbosscl/JBossClDelegatingClassPoolFactory.java
Log:
[JBREFLECT-64] RegisterModuleCallback.getUnregisteredModules() returns a copy of unregisteredModules instead of an unmodifiable version of it.
Modified: projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5/RegisterModuleCallback.java
===================================================================
--- projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5/RegisterModuleCallback.java 2009-10-22 18:03:06 UTC (rev 95437)
+++ projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5/RegisterModuleCallback.java 2009-10-22 19:24:42 UTC (rev 95438)
@@ -21,7 +21,8 @@
*/
package org.jboss.classpool.plugins.as5;
-import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
@@ -60,9 +61,9 @@
unregisteredModules.remove(module);
}
- public synchronized Set<Module> getUnregisteredModules()
+ public synchronized Collection<Module> getUnregisteredModules()
{
- return Collections.unmodifiableSet(unregisteredModules);
+ return new ArrayList<Module>(unregisteredModules);
}
public synchronized void registerModule(Module module)
Modified: projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5/jbosscl/JBossClDelegatingClassPoolFactory.java
===================================================================
--- projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5/jbosscl/JBossClDelegatingClassPoolFactory.java 2009-10-22 18:03:06 UTC (rev 95437)
+++ projects/jboss-classpool/trunk/src/main/java/org/jboss/classpool/plugins/as5/jbosscl/JBossClDelegatingClassPoolFactory.java 2009-10-22 19:24:42 UTC (rev 95438)
@@ -23,7 +23,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.util.Set;
+import java.util.Collection;
import javassist.ClassPool;
import javassist.scopedpool.ScopedClassPoolFactory;
@@ -140,7 +140,7 @@
private void registerBootstrapLoaders()
{
- Set<Module> unregistered = registerModuleCallback.getUnregisteredModules();
+ Collection<Module> unregistered = registerModuleCallback.getUnregisteredModules();
if (unregistered.size() > 0)
{
for (Module module : unregistered)
More information about the jboss-cvs-commits
mailing list