[jboss-dev-forums] [JBoss Microcontainer Development] New message: "Re: JBREFLECT-5 - Implementing generics in JavassistClassInfo"

Kabir Khan kabir.khan at jboss.com
Tue Mar 16 12:51:13 EDT 2010


What it does is
   public ClassLoader getClassLoader()
   {
      // looks like Javassist ClassPool::getClassLoader
      // doesn't check for security, so we should
      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
         sm.checkPermission(GET_CLASSLOADER_PERMISSION);

      return JavassistUtil.getClassLoader(ctClass);
   }

JavassistUtil:
   static ClassLoader getClassLoader(CtClass ctClass)
   {
      ClassPool pool = ctClass.getClassPool();
      return (pool != null) ? pool.getClassLoader() : null;
   }

Do you have something different in mind? I have commented out that security check while looking into other issues.

On 16 Mar 2010, at 13:09, Ales Justin wrote:

> JBoss development,
> 
> A new message was posted in the thread "JBREFLECT-5 - Implementing generics in JavassistClassInfo":
> 
> http://community.jboss.org/message/532265#532265
> 
> Author  : Ales Justin
> Profile : http://community.jboss.org/people/alesj
> 
> Message:
> --------------------------------------------------------------
>> getClassLoader() gets called quite a bit, and I am unsure how best to handle this?
> What about if we simply mock what Class::getClassLoader is doing, but based on Javassist API?
> 
> --------------------------------------------------------------
> 
> To reply to this message visit the message page: http://community.jboss.org/message/532265#532265
> 
> 
> _______________________________________________
> jboss-dev-forums mailing list
> jboss-dev-forums at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-dev-forums





More information about the jboss-dev-forums mailing list