Skip to content

Commit 6b8af47

Browse files
author
jossonsmith
committed
Merge with /trunk
1 parent cc5d964 commit 6b8af47

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
import org.eclipse.jdt.core.dom.ThisExpression;
7777
import org.eclipse.jdt.core.dom.ThrowStatement;
7878
import org.eclipse.jdt.core.dom.TryStatement;
79+
import org.eclipse.jdt.core.dom.Type;
7980
import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
8081
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
8182
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
@@ -1262,7 +1263,12 @@ public boolean visit(InstanceofExpression node) {
12621263
buffer.append("Clazz.instanceOf (");
12631264
node.getLeftOperand().accept(this);
12641265
buffer.append(", ");
1265-
node.getRightOperand().accept(this);
1266+
Type right = node.getRightOperand();
1267+
if (right instanceof ArrayType) {
1268+
buffer.append("Array");
1269+
} else {
1270+
right.accept(this);
1271+
}
12661272
buffer.append(")");
12671273
return false;
12681274
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2718,8 +2718,10 @@ public void endVisit(TypeDeclaration node) {
27182718
element.accept(this);
27192719
}
27202720
} else if (element instanceof Initializer) {
2721-
buffer.append(");\r\n");
2722-
staticCount = -1;
2721+
if (staticCount != -1) {
2722+
buffer.append(");\r\n");
2723+
staticCount = -1;
2724+
}
27232725
//buffer.append(",\r\nfunction () {\r\n");
27242726
element.accept(this);
27252727
//if (staticCount) {

0 commit comments

Comments
 (0)