From 9a97111df2cfc0f34e2a20b3407e13072a111e39 Mon Sep 17 00:00:00 2001 From: chiba Date: Fri, 4 Jan 2008 16:20:25 +0000 Subject: [PATCH] fixed JIRA JASSIST-40 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@416 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/CtBehavior.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/javassist/CtBehavior.java b/src/main/javassist/CtBehavior.java index bcae803f..6fb9361a 100644 --- a/src/main/javassist/CtBehavior.java +++ b/src/main/javassist/CtBehavior.java @@ -775,7 +775,11 @@ public abstract class CtBehavior extends CtMember { b.addLconst(0); b.addLstore(returnVarNo); } - else if (c != 'V') { // int, boolean, char, short, ... + else if (c == 'V') { + b.addOpcode(Opcode.ACONST_NULL); + b.addAstore(returnVarNo); + } + else { // int, boolean, char, short, ... b.addIconst(0); b.addIstore(returnVarNo); } -- 2.39.5