From 51e498f02bc9dba6eb69b61d8ac553d7ffc08f00 Mon Sep 17 00:00:00 2001 From: chiba Date: Tue, 6 Sep 2005 16:31:55 +0000 Subject: [PATCH] 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 --- src/main/javassist/expr/NewExpr.java | 2 ++ 1 file changed, 2 insertions(+) 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"); -- 2.39.5