Commits

Anonymous committed aa1b46c

using ClassLoaderUtil for getting the class

Comments (0)

Files changed (1)

src/java/com/opensymphony/oscache/web/filter/CacheFilter.java

 import com.opensymphony.oscache.base.Config;
 import com.opensymphony.oscache.base.EntryRefreshPolicy;
 import com.opensymphony.oscache.base.NeedsRefreshException;
+import com.opensymphony.oscache.util.ClassLoaderUtil;
 import com.opensymphony.oscache.web.ServletCacheAdministrator;
 
 import org.apache.commons.logging.Log;
 		String className = config.getInitParameter(classInitParam);
 		if (className != null) {
             try {
-                Class clazz = Class.forName(className);
+                Class clazz = ClassLoaderUtil.loadClass(className, this.getClass());
                 if (!interfaceClass.isAssignableFrom(clazz)) {
                     log.error("OSCache: Specified class '" + className + "' does not implement" + interfaceClass.getName() + ". Using default " + defaultObjectName + ".");
                     return null;