summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2008-01-04 16:20:25 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2008-01-04 16:20:25 +0000
commit9a97111df2cfc0f34e2a20b3407e13072a111e39 (patch)
tree07c311334fa559394b04fdb9118e0202001b91dd
parent5b38e95af69252ca03b64fd7fa08f92840180b77 (diff)
downloadjavassist-9a97111df2cfc0f34e2a20b3407e13072a111e39.tar.gz
javassist-9a97111df2cfc0f34e2a20b3407e13072a111e39.zip
fixed JIRA JASSIST-40
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@416 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r--src/main/javassist/CtBehavior.java6
1 files changed, 5 insertions, 1 deletions
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);
}