]
Shigeru Chiba resolved JASSIST-70.
----------------------------------
Resolution: Done
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: