From: chiba Date: Tue, 3 Jun 2008 08:46:36 +0000 (+0000) Subject: $type support by CtBehavior#insertBefore: JIRA JASSIST-62 X-Git-Tag: rel_3_17_1_ga~201 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6efe0397d30c3e568c53b401e3d65813d520d8c6;p=javassist.git $type support by CtBehavior#insertBefore: JIRA JASSIST-62 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@442 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- diff --git a/src/main/javassist/CtBehavior.java b/src/main/javassist/CtBehavior.java index 3539fd5f..4a699a90 100644 --- a/src/main/javassist/CtBehavior.java +++ b/src/main/javassist/CtBehavior.java @@ -654,6 +654,7 @@ public abstract class CtBehavior extends CtMember { Modifier.isStatic(getModifiers())); jv.recordParamNames(ca, nvars); jv.recordLocalVariables(ca, 0); + jv.recordType(getReturnType0()); jv.compileStmnt(src); Bytecode b = jv.getBytecode(); int stack = b.getMaxStack(); diff --git a/src/main/javassist/compiler/JvstCodeGen.java b/src/main/javassist/compiler/JvstCodeGen.java index b9574c83..47188504 100644 --- a/src/main/javassist/compiler/JvstCodeGen.java +++ b/src/main/javassist/compiler/JvstCodeGen.java @@ -95,7 +95,7 @@ public class JvstCodeGen extends MemberCodeGen { } else if (name.equals(dollarTypeName)) { if (dollarType == null) - throw new CompileError(dollarType + " is not available"); + throw new CompileError(dollarTypeName + " is not available"); bytecode.addLdc(Descriptor.of(dollarType)); callGetType("getType");