diff options
-rw-r--r-- | Readme.html | 5 | ||||
-rw-r--r-- | src/main/javassist/util/proxy/SerializedProxy.java | 16 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Readme.html b/Readme.html index eafd2e72..28d2a1f6 100644 --- a/Readme.html +++ b/Readme.html @@ -281,6 +281,11 @@ see javassist.Dump. <h2>Changes</h2> +<p>-version 3.11 +<ul> + <li>JIRA JASSIST-74, 75 was fixed. +</ul> + <p>-version 3.10 on March 5, 2009 <ul> diff --git a/src/main/javassist/util/proxy/SerializedProxy.java b/src/main/javassist/util/proxy/SerializedProxy.java index d4306220..af866efe 100644 --- a/src/main/javassist/util/proxy/SerializedProxy.java +++ b/src/main/javassist/util/proxy/SerializedProxy.java @@ -45,15 +45,27 @@ class SerializedProxy implements Serializable { } } + /** + * Load class. + * + * @param className the class name + * @return loaded class + * @throws ClassNotFoundException for any error + */ + protected Class loadClass(String className) throws ClassNotFoundException { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + return cl.loadClass(className); + } + Object readResolve() throws ObjectStreamException { try { int n = interfaces.length; Class[] infs = new Class[n]; for (int i = 0; i < n; i++) - infs[i] = Class.forName(interfaces[i]); + infs[i] = loadClass(interfaces[i]); ProxyFactory f = new ProxyFactory(); - f.setSuperclass(Class.forName(superClass)); + f.setSuperclass(loadClass(superClass)); f.setInterfaces(infs); f.setFilter(filter); f.setHandler(handler); |