[jboss-cvs] JBossAS SVN: r94912 - projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 14 21:26:06 EDT 2009
Author: flavia.rainone at jboss.com
Date: 2009-10-14 21:26:05 -0400 (Wed, 14 Oct 2009)
New Revision: 94912
Modified:
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/JavassistUtil.java
Log:
[JBREFLECT-58] JavassistUtil.toCtClass(ClassInfo) method now takes into account the ClassLoader of ClassInfo.
Modified: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/JavassistUtil.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/JavassistUtil.java 2009-10-15 01:11:32 UTC (rev 94911)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/JavassistUtil.java 2009-10-15 01:26:05 UTC (rev 94912)
@@ -39,7 +39,6 @@
*/
public class JavassistUtil
{
- //TODO JBREFLECT-58: need to change the classpool/loader fetching
static ClassPool pool = ClassPool.getDefault();
static ClassLoader loader = JavassistUtil.class.getClassLoader();
@@ -147,7 +146,9 @@
{
try
{
- return pool.get(clazz.getName());
+ ClassLoader classLoader = clazz.getType().getClassLoader();
+ ClassPool classPool = JavassistTypeInfoFactoryImpl.getPoolFactory().getPoolForLoader(classLoader);
+ return classPool.get(clazz.getName());
}
catch (NotFoundException e)
{
More information about the jboss-cvs-commits
mailing list