]> source.dussan.org Git - javassist.git/commitdiff
fixed JIRA JASSIST-41
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Sun, 20 Jan 2008 13:33:51 +0000 (13:33 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Sun, 20 Jan 2008 13:33:51 +0000 (13:33 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@417 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/expr/NewExpr.java

index 0552ba9ed7c88ef615e060d78d96fe6365817d3a..f52c67ae9a7c70c545ea7a90c5ef8b80d3031734 100644 (file)
@@ -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");
     }
 
     /**