diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2006-05-09 17:18:31 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2006-05-09 17:18:31 +0000 |
commit | 5a318e3e74ea36bedfb0f5b86c3eca4294d3d34d (patch) | |
tree | 854e6b055be8dc0a1ba6ab593c0902ee453c9a3d /src/main/javassist/util | |
parent | 6670a563453f1eb0ed297504de1897094c5f5980 (diff) | |
download | javassist-5a318e3e74ea36bedfb0f5b86c3eca4294d3d34d.tar.gz javassist-5a318e3e74ea36bedfb0f5b86c3eca4294d3d34d.zip |
fixed JASSIST-18.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@269 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/util')
-rw-r--r-- | src/main/javassist/util/proxy/ProxyFactory.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/javassist/util/proxy/ProxyFactory.java b/src/main/javassist/util/proxy/ProxyFactory.java index 47b25950..63088940 100644 --- a/src/main/javassist/util/proxy/ProxyFactory.java +++ b/src/main/javassist/util/proxy/ProxyFactory.java @@ -177,13 +177,19 @@ public class ProxyFactory { } protected ClassLoader getClassLoader() { + // return Thread.currentThread().getContextClassLoader(); + ClassLoader loader; if (superClass != null && !superClass.getName().equals("java.lang.Object")) - return superClass.getClassLoader(); + loader = superClass.getClassLoader(); else if (interfaces != null && interfaces.length > 0) - return interfaces[0].getClassLoader(); + loader = interfaces[0].getClassLoader(); else - return this.getClass().getClassLoader(); - // return Thread.currentThread().getContextClassLoader(); + loader = this.getClass().getClassLoader(); + + if (loader == null) + loader = ClassLoader.getSystemClassLoader(); + + return loader; } /** |