diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2021-02-04 22:17:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 22:17:22 +0100 |
commit | ed4ced1a3bc694f9a9903b5a15b2641236ff2f92 (patch) | |
tree | b2fc7abd39c121c1965601ea843e849a14d81397 /src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | |
parent | 0519cb23b1ab4e572d4c6e8b2d8b9c12c19af4ad (diff) | |
parent | 5ee6271902c05a3cad28b611be60bce94f6904a8 (diff) | |
download | lombok-ed4ced1a3bc694f9a9903b5a15b2641236ff2f92.tar.gz lombok-ed4ced1a3bc694f9a9903b5a15b2641236ff2f92.tar.bz2 lombok-ed4ced1a3bc694f9a9903b5a15b2641236ff2f92.zip |
Merge pull request #2719 from Rawi01/superbuilder-initializer-npe
SuperBuilder now skips initializers while gathering types
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleSuperBuilder.java')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java index e08fc334..d9c8946f 100644 --- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java @@ -50,6 +50,7 @@ import org.eclipse.jdt.internal.compiler.ast.FalseLiteral; import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; import org.eclipse.jdt.internal.compiler.ast.FieldReference; import org.eclipse.jdt.internal.compiler.ast.IfStatement; +import org.eclipse.jdt.internal.compiler.ast.Initializer; import org.eclipse.jdt.internal.compiler.ast.MessageSend; import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.NullLiteral; @@ -1102,6 +1103,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> { // 3. Add used type names. if (td.fields != null) { for (FieldDeclaration field : td.fields) { + if (field instanceof Initializer) continue; char[][] typeName = field.type.getTypeName(); if (typeName.length >= 1) // Add the first token, because only that can collide. usedNames.add(String.valueOf(typeName[0])); |