]> source.dussan.org Git - javassist.git/commitdiff
JASSIST-75
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Thu, 26 Mar 2009 12:20:43 +0000 (12:20 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Thu, 26 Mar 2009 12:20:43 +0000 (12:20 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@472 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

Readme.html
src/main/javassist/util/proxy/SerializedProxy.java

index eafd2e726a2a2c6fa2b15c0f714cf74e5b80fc11..28d2a1f6a66f679569d46fb257399e4654b017a4 100644 (file)
@@ -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>
index d4306220ab3918e4d932f14ff5b39dd4abd7108b..af866efe5a015321390f7f4b95f5364b96e3b3b5 100644 (file)
@@ -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);