]
Scott Marlow commented on JASSIST-162:
--------------------------------------
Donnchadh also reported the
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: