aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2021-01-21 09:42:31 +0100
committerRawi01 <Rawi01@users.noreply.github.com>2021-01-21 09:43:57 +0100
commit5ee6271902c05a3cad28b611be60bce94f6904a8 (patch)
tree5014f66ce24f886cb540531f766b2a6e82b0440e /src/core
parent04f17f4dcfbb0e7881d605708467498e3ec56521 (diff)
downloadlombok-5ee6271902c05a3cad28b611be60bce94f6904a8.tar.gz
lombok-5ee6271902c05a3cad28b611be60bce94f6904a8.tar.bz2
lombok-5ee6271902c05a3cad28b611be60bce94f6904a8.zip
[fixes #2716] SuperBuilder now skips initializers while gathering types
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSuperBuilder.java2
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 8fdfd315..a0bd0600 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;
@@ -1093,6 +1094,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]));