[Jboss-cvs] JBossAS SVN: r56782 - trunk/aop/src/main/org/jboss/aop/classpool

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 12 16:19:29 EDT 2006


Author: kabir.khan at jboss.com
Date: 2006-09-12 16:19:14 -0400 (Tue, 12 Sep 2006)
New Revision: 56782

Modified:
   trunk/aop/src/main/org/jboss/aop/classpool/AOPClassPool.java
Log:


Modified: trunk/aop/src/main/org/jboss/aop/classpool/AOPClassPool.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/classpool/AOPClassPool.java	2006-09-12 19:44:34 UTC (rev 56781)
+++ trunk/aop/src/main/org/jboss/aop/classpool/AOPClassPool.java	2006-09-12 20:19:14 UTC (rev 56782)
@@ -77,6 +77,20 @@
       AOPClassPoolRepository.getInstance().perfomUnregisterClassLoader(getClassLoader());
    }
 
+   
+   protected ClassLoader getClassLoader0()
+   {
+      try
+      {
+         return getClassLoader();
+      }
+      catch (RuntimeException e)
+      {
+         //Ignore, the ScopedClassPoll throws an exception if pool is not associated with a cl
+      }
+      return null;
+   }
+   
    public CtClass getCached(String classname)
    {
       CtClass clazz = getCachedLocally(classname);
@@ -84,16 +98,8 @@
       {
          boolean isLocal = false; 
          
-         ClassLoader cl = null;
-         try
-         {
-            //FIXME use getClassLoader0() and get rid of try/catch once next release of javassist is out
-            cl = getClassLoader();
-         }
-         catch (RuntimeException e)
-         {
-            //Ignore, the ScopedClassPoll throws an exception if pool is not associated with a cl
-         }
+         ClassLoader cl = getClassLoader0();
+
          if (cl != null)
          {
             String classResourceName = getResourceName(classname);




More information about the jboss-cvs-commits mailing list