Skip to content

Commit 27ad92b

Browse files
committed
Bug fixes
1 parent e09b252 commit 27ad92b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,17 +886,17 @@ protected void visitMethodParameterList(ITypeBinding nodeTypeBinding, List argum
886886
}
887887
}
888888
}
889+
if (!alreadyPrefixed && prefix != null) {
890+
buffer.append(prefix);
891+
alreadyPrefixed = true;
892+
}
889893
if (!isVarArgs && ambitiousResult != null && ambitiousResult[i] != null) {
890894
buffer.append("Clazz.castObjectAs(");
891895
}
892896
String parameterTypeName = null;
893897
if (parameterTypes != null) {
894898
parameterTypeName = parameterTypes[i].getName();
895899
}
896-
if (!alreadyPrefixed && prefix != null) {
897-
buffer.append(prefix);
898-
alreadyPrefixed = true;
899-
}
900900
if (isVarArgs) {
901901
buffer.append("[");
902902
for (int j = i; j < argSize; j++) {

sources/net.sf.j2s.core/src/net/sf/j2s/core/astvisitors/DependencyASTVisitor.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ public static void main(String[] args) {
341341

342342

343343
public boolean isNodeInMustPath(ASTNode node) {
344+
// Add more class dependencies in musts will make classloader running
345+
// into stack call limit reached.
346+
// Temporary disable this bug fix.
347+
/*
344348
if (node == null) return false;
345349
do {
346350
if (node instanceof TypeDeclaration) {
@@ -350,14 +354,15 @@ public boolean isNodeInMustPath(ASTNode node) {
350354
MethodDeclaration m = (MethodDeclaration) node;
351355
return m.isConstructor();
352356
}
353-
if (node instanceof VariableDeclarationFragment) {
357+
if (node instanceof FieldDeclaration) {
354358
return true;
355359
}
356360
if (node instanceof Initializer) {
357361
return true;
358362
}
359363
node = node.getParent();
360364
} while (node != null);
365+
// */
361366
return false;
362367
}
363368

0 commit comments

Comments
 (0)