]> source.dussan.org Git - javassist.git/commitdiff
fixed a bug so that ExprEditor#edit(NewExpr) can process a method compiled by Eclipse.
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 6 Sep 2005 16:31:55 +0000 (16:31 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 6 Sep 2005 16:31:55 +0000 (16:31 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@205 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/expr/NewExpr.java

index 7c3a41606d4d0f87989b9cff88daeeb93eed4781..2f976d82d4e640574a70d8edd97ca1cfb1ca4341 100644 (file)
@@ -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");