Skip to content

Commit 701b8a2

Browse files
author
zhourenjian
committed
Fixed bug that #invokde (null, new Object [] { ... }) did not wrap Array correctly fro method #invoke(Object, Object ...);
1 parent d77068e commit 701b8a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/net/sf/j2s/core/astvisitors/ASTScriptVisitor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,13 +1436,13 @@ public boolean visit(MethodInvocation node) {
14361436
buffer.append(", ");
14371437
}
14381438
boolean needBrackets = true;
1439-
if (args.size() == 1) {
1440-
Expression arg = (Expression) args.get(0);
1439+
//if (args.size() == 1) {
1440+
Expression arg = (Expression) args.get(args.size() - 1);
14411441
ITypeBinding resolveTypeBinding = arg.resolveTypeBinding();
14421442
if (resolveTypeBinding.isArray()) {
14431443
needBrackets = false;
14441444
}
1445-
}
1445+
//}
14461446
if (needBrackets) buffer.append("[");
14471447
visitList(args, ", ", paramTypes.length - 1, size);
14481448
if (needBrackets) buffer.append("]");

0 commit comments

Comments
 (0)