diff options
Diffstat (limited to 'src/main/javassist/util/proxy/SerializedProxy.java')
-rw-r--r-- | src/main/javassist/util/proxy/SerializedProxy.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/javassist/util/proxy/SerializedProxy.java b/src/main/javassist/util/proxy/SerializedProxy.java index 36425a88..a0485da0 100644 --- a/src/main/javassist/util/proxy/SerializedProxy.java +++ b/src/main/javassist/util/proxy/SerializedProxy.java @@ -17,6 +17,7 @@ package javassist.util.proxy; import java.io.Serializable; +import java.lang.reflect.InvocationTargetException; import java.io.ObjectStreamException; import java.security.AccessController; import java.security.PrivilegedActionException; @@ -82,10 +83,16 @@ class SerializedProxy implements Serializable { ProxyFactory f = new ProxyFactory(); f.setSuperclass(loadClass(superClass)); f.setInterfaces(infs); - Proxy proxy = (Proxy)f.createClass(filterSignature).newInstance(); + Proxy proxy = (Proxy)f.createClass(filterSignature).getConstructor().newInstance(); proxy.setHandler(handler); return proxy; } + catch (NoSuchMethodException e) { + throw new java.io.InvalidClassException(e.getMessage()); + } + catch (InvocationTargetException e) { + throw new java.io.InvalidClassException(e.getMessage()); + } catch (ClassNotFoundException e) { throw new java.io.InvalidClassException(e.getMessage()); } |