Skip to content

Commit 6248d96

Browse files
author
jossonsmith
committed
Fixed bug that ignore super constructors like:
public GridData() { super(); }
1 parent c657104 commit 6248d96

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,13 @@ public boolean visit(MethodDeclaration node) {
13851385
SuperConstructorInvocation superConstructor = (SuperConstructorInvocation) statement;
13861386
needToCheckArgs = true;
13871387
argsList = superConstructor.arguments();
1388+
if (argsList.size() == 0) {
1389+
IMethodBinding constructorBinding = superConstructor.resolveConstructorBinding();
1390+
ITypeBinding declaringClass = constructorBinding.getDeclaringClass();
1391+
if ("java.lang.Object".equals(declaringClass.getQualifiedName())) {
1392+
needToCheckArgs = false;
1393+
}
1394+
}
13881395
}
13891396
}
13901397
if (needToCheckArgs) {

0 commit comments

Comments
 (0)