]
Jumper Chen commented on JASSIST-247:
-------------------------------------
a workaround is to handle the serilization by ourself that we can override the
writeObject() and readObject() into the class of FormStatusImpl, but it needs a public
method of ProxyFactory#createClass(byte[] signature).
SerializedProxy won't work on JDK8
----------------------------------
Key: JASSIST-247
URL:
https://issues.jboss.org/browse/JASSIST-247
Project: Javassist
Issue Type: Bug
Affects Versions: 3.18.2-GA, 3.19.0-GA
Environment: JDK 8
Reporter: Jumper Chen
Assignee: Shigeru Chiba
Labels: javassist, serializable, serialization
If we serialize the proxy object, it will cause java.lang.ClassCastException on JDK8, but
it works on JDK7.
The following is its error log.
{code}
Exception in thread "main" java.lang.ClassCastException: cannot assign instance
of javassist.util.proxy.SerializedProxy to field
issue.SerializationIssue$FormProxyHandler$FormStatusImpl.self of type
issue.SerializationIssue$FormProxyObject in instance of
issue.SerializationIssue$FormProxyHandler$FormStatusImpl
{code}