[jboss-jira] [JBoss JIRA] (JASSIST-162) Correction introduced in JASSIST-127 raises AbstractMethodError on call site
Donnchadh Ó Donnabháin (JIRA)
jira-events at lists.jboss.org
Fri Dec 14 07:23:17 EST 2012
[ https://issues.jboss.org/browse/JASSIST-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741445#comment-12741445 ]
Donnchadh Ó Donnabháin commented on JASSIST-162:
------------------------------------------------
Any thoughts on this patch? What can be done to get this into 3.18.0 ?
I've just run into issues with Hibernate 4.1.9 and javassist 3.17.1 . The problem arises when a bridge getter method is overridden in the proxy class rather than the desired non-bridge method. I haven't racked down the exact cause of the problem but full support for bridge methods would seem to be important. The problem only occurs for javassist versions after 3.15.0 and doesn't seem to have been directly introduced by the update of the hibernate version we use.
> Correction introduced in JASSIST-127 raises AbstractMethodError on call site
> ----------------------------------------------------------------------------
>
> Key: JASSIST-162
> URL: https://issues.jboss.org/browse/JASSIST-162
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.16.1-GA
> Environment: OSX, JDK 1.6.0_29
> Reporter: Brice Dutheil
> Assignee: Shigeru Chiba
> Attachments: JASSIST-162___correct_patch_for_bridge_methods_and_covariant_return_types.patch
>
>
> The proposed solution in JASSIST-127 doesn't work, the JVM raises an {{AbstractMethodError}} on the call site.
> What happen is that in {{getMethods}} the code now discard method with same name / same arguments as the return type is not taken into account when generating the key.
> Reverting this patch will raises a {{DuplicateMemberException}}, the reason is that {{ClassFile.isDuplicated}} don't see either of the possible duplicate method as bridge.
> I've created a patch that detect methods with covariant type and mark forwarding methods as bridge if relevant.
> Note that the effect is only for method calls that have the very same arguments, as Javassist don't see duplicate methods if the arguments differ, e.g. proxying ({{StringList extends List<String>}}) will see {{add(Object)}} and {{add(String)}}, though the first one is not marked as bridge in the generated bytecode.
> Also, I'm not sure of that one, but the patch also adds a boolean to enable the {{MethodHandler}} to intercept bridge methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list