瀏覽代碼

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
tags/rel_3_17_1_ga
chiba 19 年之前
父節點
當前提交
51e498f02b
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      src/main/javassist/expr/NewExpr.java

+ 2
- 0
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");

Loading…
取消
儲存