Browse Source

JASSIST-75


git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@472 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
tags/rel_3_17_1_ga
chiba 15 years ago
parent
commit
daeda495ae
2 changed files with 19 additions and 2 deletions
  1. 5
    0
      Readme.html
  2. 14
    2
      src/main/javassist/util/proxy/SerializedProxy.java

+ 5
- 0
Readme.html View 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>

+ 14
- 2
src/main/javassist/util/proxy/SerializedProxy.java View 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);

Loading…
Cancel
Save