[jboss-jira] [JBoss JIRA] Created: (JASSIST-85) IllegalAccessError when trying to call clone() on a class generated by ProxyFactory
Tobias Meyer (JIRA)
jira-events at lists.jboss.org
Tue Jun 23 07:17:56 EDT 2009
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
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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list