]
Shigeru Chiba resolved JASSIST-85.
----------------------------------
Fix Version/s: 3.11.0.GA
Resolution: Done
I applied the patch. Thanks!
IllegalAccessError when trying to call clone() on a class generated
by ProxyFactory
-----------------------------------------------------------------------------------
Key: JASSIST-85
URL:
https://jira.jboss.org/jira/browse/JASSIST-85
Project: Javassist
Issue Type: Bug
Affects Versions: 3.10.0.GA
Reporter: Tobias Meyer
Assignee: Shigeru Chiba
Fix For: 3.11.0.GA
Hibernate 3.3 uses javassist (by default) to generate LazyInitializer Objects.
If a lazily loaded object implements the clone() method, and makes it public, there will
be a runtime IllegalAccessError because the javassist proxy object exports the protected
definition of Object.clone() instead of the definition in the MethodHandler's
Interface.
The supplied patch makes the ProxyFactory to never reduce the visibility of a public
method, even if implemented in a higher interface or the superclass.
Normally the java compiler would catch such an error, so this is assumed to be save.
Side effect is of course that a superclass method given to ProxyFactory might not be
called as before because a public definition of the MethodHandler (Interface) overloads
it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: