[jboss-cvs] JBossCache/src/org/jboss/cache/factories ...
Brian Stansberry
brian.stansberry at jboss.com
Wed Oct 25 00:45:12 EDT 2006
User: bstansberry
Date: 06/10/25 00:45:12
Modified: src/org/jboss/cache/factories InterceptorChainFactory.java
Log:
Extract multiple loadClass impls to a util class
Revision Changes Path
1.32 +2 -22 JBossCache/src/org/jboss/cache/factories/InterceptorChainFactory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InterceptorChainFactory.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/factories/InterceptorChainFactory.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- InterceptorChainFactory.java 25 Sep 2006 05:50:03 -0000 1.31
+++ InterceptorChainFactory.java 25 Oct 2006 04:45:12 -0000 1.32
@@ -12,6 +12,7 @@
import org.jboss.cache.TreeCache;
import org.jboss.cache.interceptors.*;
import org.jboss.cache.loader.CacheLoaderManager;
+import org.jboss.cache.util.Util;
import java.util.ArrayList;
import java.util.List;
@@ -51,7 +52,7 @@
private Interceptor createInterceptor(String classname, CacheSPI cache) throws ClassNotFoundException, IllegalAccessException, InstantiationException
{
- Class clazz = loadClass(classname);
+ Class clazz = Util.loadClass(classname);
return createInterceptor(clazz, cache);
}
@@ -74,27 +75,6 @@
first.setNext(i);
}
-
- /**
- * Loads the specified class using this class's classloader, or, if it is <code>null</code>
- * (i.e. this class was loaded by the bootstrap classloader), the system classloader.
- * <p/>
- * If loadtime instrumentation via GenerateInstrumentedClassLoader is used, this
- * class may be loaded by the bootstrap classloader.
- * </p>
- *
- * @throws ClassNotFoundException
- */
- protected Class loadClass(String classname) throws ClassNotFoundException
- {
- ClassLoader cl = getClass().getClassLoader();
- if (cl == null)
- {
- cl = ClassLoader.getSystemClassLoader();
- }
- return cl.loadClass(classname);
- }
-
/**
* Assembles the interceptor stack. Presence and order of interceptors is determined by looking at
* the cache configuration. In the future, this will be accessible through XML. See refactoring.txt for
More information about the jboss-cvs-commits
mailing list