Anonymous avatar Anonymous committed aa1b46c

using ClassLoaderUtil for getting the class

Comments (0)

Files changed (1)


 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;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.