From 075e0b82876cc274dedf125a44b5288d6e594b3f Mon Sep 17 00:00:00 2001 From: chiba Date: Wed, 1 Feb 2012 09:56:21 +0000 Subject: [PATCH] fixed JASSIST-149 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@607 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/CtBehavior.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/javassist/CtBehavior.java b/src/main/javassist/CtBehavior.java index c58fc932..8a690da3 100644 --- a/src/main/javassist/CtBehavior.java +++ b/src/main/javassist/CtBehavior.java @@ -651,7 +651,15 @@ public abstract class CtBehavior extends CtMember { /** * Modifies the method/constructor body. * + *

While executing this method, only replace() + * in Expr is available for bytecode modification. + * Other methods such as insertBefore() may collapse + * the bytecode because the ExprEditor loses + * its current position. + * * @param editor specifies how to modify. + * @see javassist.expr.Expr#replace(String) + * @see #insertBefore(String) */ public void instrument(ExprEditor editor) throws CannotCompileException -- 2.39.5