[jboss-jira] [JBoss JIRA] Created: (JASSIST-70) instrumenting a constructor with insertAfter() and asFinally=true
Shigeru Chiba (JIRA)
jira-events at lists.jboss.org
Sun Dec 7 01:28:36 EST 2008
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