mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 22:16:11 +00:00
The EclipseAST was incomplete when it came to ConstructorCalls. This lead to a severe error in PatchDelegate(issue #211) where classes that didn't use lombok at all could not be build due to a NullPointerException.
This commit is contained in:
1 parent
88f4e2d2e3
commit
b512546508
1 file changed
+5
@@ -35,6 +35,7 @@ import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
|
||||
import org.eclipse.jdt.internal.compiler.ast.Annotation;
|
||||
import org.eclipse.jdt.internal.compiler.ast.Argument;
|
||||
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
|
||||
import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration;
|
||||
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
|
||||
import org.eclipse.jdt.internal.compiler.ast.ImportReference;
|
||||
import org.eclipse.jdt.internal.compiler.ast.Initializer;
|
||||
@@ -301,6 +302,10 @@ public class EclipseAST extends AST<EclipseAST, EclipseNode, ASTNode> {
|
||||
if (setAndGetAsHandled(method)) return null;
|
||||
List<EclipseNode> childNodes = new ArrayList<EclipseNode>();
|
||||
childNodes.addAll(buildArguments(method.arguments));
|
||||
if (method instanceof ConstructorDeclaration) {
|
||||
ConstructorDeclaration constructor = (ConstructorDeclaration) method;
|
||||
addIfNotNull(childNodes, buildStatement(constructor.constructorCall));
|
||||
}
|
||||
childNodes.addAll(buildStatements(method.statements));
|
||||
childNodes.addAll(buildAnnotations(method.annotations, false));
|
||||
return putInMap(new EclipseNode(this, method, childNodes, Kind.METHOD));
|
||||
|
||||
Reference in new issue
Block a user