aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2005-09-06 16:31:55 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2005-09-06 16:31:55 +0000
commit51e498f02bc9dba6eb69b61d8ac553d7ffc08f00 (patch)
tree05619a88cf41e4557aeaaba095c21a2d9bb5ee28 /src/main
parentd59bfd284a5a2f7dcb380ccb358621a5bd4b1b6b (diff)
downloadjavassist-51e498f02bc9dba6eb69b61d8ac553d7ffc08f00.tar.gz
javassist-51e498f02bc9dba6eb69b61d8ac553d7ffc08f00.zip
fixed a bug so that ExprEditor#edit(NewExpr) can process a method compiled by Eclipse.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@205 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main')
-rw-r--r--src/main/javassist/expr/NewExpr.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/javassist/expr/NewExpr.java b/src/main/javassist/expr/NewExpr.java
index 7c3a4160..2f976d82 100644
--- a/src/main/javassist/expr/NewExpr.java
+++ b/src/main/javassist/expr/NewExpr.java
@@ -125,6 +125,8 @@ public class NewExpr extends Expr {
else if (op == Opcode.DUP_X1
&& iterator.byteAt(newPos + 4) == Opcode.SWAP)
return 5;
+ else if (op == Opcode.INVOKESPECIAL)
+ return 3; // for Eclipse's compiler
else
throw new CannotCompileException(
"sorry, cannot edit NEW followed by no DUP");