[jboss-jira] [JBoss JIRA] (JASSIST-162) Correction introduced in JASSIST-127 raises AbstractMethodError on call site

Brice Dutheil (JIRA) jira-events at lists.jboss.org
Thu Mar 22 07:35:47 EDT 2012


Brice Dutheil created JASSIST-162:
-------------------------------------

             Summary: 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


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: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list