[jboss-jira] [JBoss JIRA] Closed: (JASSIST-70) instrumenting a constructor with insertAfter() and asFinally=true

Shigeru Chiba (JIRA) jira-events at lists.jboss.org
Thu Apr 15 10:57:26 EDT 2010


     [ https://jira.jboss.org/jira/browse/JASSIST-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shigeru Chiba closed JASSIST-70.
--------------------------------



> instrumenting a constructor with insertAfter() and asFinally=true
> -----------------------------------------------------------------
>
>                 Key: JASSIST-70
>                 URL: https://jira.jboss.org/jira/browse/JASSIST-70
>             Project: Javassist
>          Issue Type: Bug
>            Reporter: Shigeru Chiba
>            Assignee: Shigeru Chiba
>
> (reported by Patrice Bouillet)
> Instrumenting a Constructor with the insertAfter method and
> 'asFinally' set to true leads to a corrupt constructor. This is due to
> surrounding the this() and super() calls which cannot be done.
> Solution: I think you already know the solution, because the correct
> behaviour is already done for the addCatch method, so for the
> insertAfter method in CtBehaviour I just modified the line according to
> the addCatch:
> if (asFinally) {
>  ca.getExceptionTable().add(getStartPosOfBody(ca), gapPos, gapPos, 0);
> }
> With this modification, the instrumentation works as expected.

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