diff options
Diffstat (limited to 'src/main/javassist/CtConstructor.java')
-rw-r--r-- | src/main/javassist/CtConstructor.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/javassist/CtConstructor.java b/src/main/javassist/CtConstructor.java index e294ca51..72dcee11 100644 --- a/src/main/javassist/CtConstructor.java +++ b/src/main/javassist/CtConstructor.java @@ -284,4 +284,18 @@ public final class CtConstructor extends CtBehavior { throw new CannotCompileException(e); } } + + /* This method is called by addCatch() in CtBehavior. + * super() and this() must not be in a try statement. + */ + int getStartPosOfBody(CodeAttribute ca) throws CannotCompileException { + CodeIterator ci = ca.iterator(); + try { + ci.skipConstructor(); + return ci.next(); + } + catch (BadBytecode e) { + throw new CannotCompileException(e); + } + } } |