From a95aa5298350c3c5d9310c6e99c58534d1e25f6e Mon Sep 17 00:00:00 2001 From: chiba Date: Sun, 20 Jan 2008 13:33:51 +0000 Subject: [PATCH] fixed JIRA JASSIST-41 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@417 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/expr/NewExpr.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/javassist/expr/NewExpr.java b/src/main/javassist/expr/NewExpr.java index 0552ba9e..f52c67ae 100644 --- a/src/main/javassist/expr/NewExpr.java +++ b/src/main/javassist/expr/NewExpr.java @@ -144,11 +144,10 @@ 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"); + return 3; // for Eclipse. The generated code may include no DUP. + // throw new CannotCompileException( + // "sorry, cannot edit NEW followed by no DUP"); } /** -- 2.39.5