summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2008-01-20 13:33:51 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2008-01-20 13:33:51 +0000
commita95aa5298350c3c5d9310c6e99c58534d1e25f6e (patch)
treebdc014cb436f746eaea39b9f918fbdf3e6c07ad1
parent9a97111df2cfc0f34e2a20b3407e13072a111e39 (diff)
downloadjavassist-a95aa5298350c3c5d9310c6e99c58534d1e25f6e.tar.gz
javassist-a95aa5298350c3c5d9310c6e99c58534d1e25f6e.zip
fixed JIRA JASSIST-41
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@417 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r--src/main/javassist/expr/NewExpr.java7
1 files 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");
}
/**