Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04da856

Browse files
author
soheil_h_y
committed
1. Misc Bug is solved.
1 parentf4a571b commit04da856

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

‎sources/net.sf.j2s.core/src/net/sf/j2s/core/astvisitors/ASTKeywordVisitor.java‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ public boolean visit(ArrayCreation node) {
162162
initializer.accept(this);
163163
}else {
164164
Listdim =node.dimensions();
165-
ITypeBindingbinding =node.getType().resolveBinding();
166-
if(binding !=null){
167-
ITypeBindingelementType =binding.getElementType();
165+
node.getType().resolveBinding();
166+
node.getType().getComponentType().resolveBinding();
167+
ITypeBindingelementType =node.getType().getElementType().resolveBinding();
168+
elementType =node.getType().getElementType().resolveBinding();
169+
if(elementType !=null){
168170
if (elementType.isPrimitive()) {
169171
StringtypeCode =elementType.getName();
170172
if ("int".equals(typeCode)
@@ -195,16 +197,16 @@ public boolean visit(ArrayCreation node) {
195197
buffer.append(")");
196198
}
197199
}
198-
}
199-
}else {
200-
if (dim !=null &&dim.size() >1) {
201-
buffer.append(" Clazz.newArray (");
202-
visitList(dim,", ");
203-
buffer.append(", null)");
204200
}else {
205-
buffer.append(" new Array (");
206-
visitList(dim,"");
207-
buffer.append(")");
201+
if (dim !=null &&dim.size() >1) {
202+
buffer.append(" Clazz.newArray (");
203+
visitList(dim,", ");
204+
buffer.append(", null)");
205+
}else {
206+
buffer.append(" new Array (");
207+
visitList(dim,"");
208+
buffer.append(")");
209+
}
208210
}
209211
}
210212
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp