File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
src/net/sf/j2s/core/astvisitors Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 7676import org .eclipse .jdt .core .dom .ThisExpression ;
7777import org .eclipse .jdt .core .dom .ThrowStatement ;
7878import org .eclipse .jdt .core .dom .TryStatement ;
79+ import org .eclipse .jdt .core .dom .Type ;
7980import org .eclipse .jdt .core .dom .VariableDeclarationExpression ;
8081import org .eclipse .jdt .core .dom .VariableDeclarationFragment ;
8182import 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 }
Original file line number Diff line number Diff 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) {
You can’t perform that action at this time.
0 commit comments