Commits

Anonymous committed 8cbe669

Rolled back PropertySetManager classloader changes, until we add a new
method on ClassloaderUtil to take a classloader.

git-svn-id: http://svn.opensymphony.com/svn/propertyset/trunk@92bf3cbcdd-1c1a-0410-9a68-d6f521e3fa7b

  • Participants
  • Parent commits 6fa966c

Comments (0)

Files changed (1)

File src/java/com/opensymphony/module/propertyset/PropertySetManager.java

 
 import com.opensymphony.module.propertyset.config.PropertySetConfig;
 
-import com.opensymphony.util.ClassLoaderUtil;
-
 import java.util.Map;
 
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public static PropertySet getInstance(String name, Map args) {
+        PropertySet ps = getInstance(name, args, PropertySetManager.class.getClassLoader());
+
+        if (ps == null) {
+            ps = getInstance(name, args, Thread.currentThread().getContextClassLoader());
+        }
+
+        return ps;
+    }
+
+    public static PropertySet getInstance(String name, Map args, ClassLoader loader) {
         PropertySetConfig psc = PropertySetConfig.getConfig();
         String clazz = psc.getClassName(name);
         Map config = psc.getArgs(name);
-        Class psClass = null;
+        Class psClass;
 
         try {
-            psClass = ClassLoaderUtil.loadClass(clazz, PropertySetManager.class);
+            psClass = loader.loadClass(clazz);
         } catch (ClassNotFoundException ex) {
             return null;
         }