From 59717d0c95d62b0b1bedd49ac4a047663a55da22 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Thu, 19 May 2022 22:59:30 +0200 Subject: [fixes #3181] Copy field name arrays in (Super)Builder The eclipse SelectionEngine uses the identity, finds the field in the builder and gets confused by the wrong source positions. If we clone the array it only finds the correct field and it works as expected. --- src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lombok/eclipse/handlers/HandleSuperBuilder.java') diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java index 558c6ec2..0d327d5f 100644 --- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java @@ -948,7 +948,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { } if (field == null) { - FieldDeclaration fd = new FieldDeclaration(bfd.builderFieldName, 0, 0); + FieldDeclaration fd = new FieldDeclaration(bfd.builderFieldName.clone(), 0, 0); fd.bits |= Eclipse.ECLIPSE_DO_NOT_TOUCH_FLAG; fd.modifiers = ClassFileConstants.AccPrivate; fd.type = copyType(bfd.type); -- cgit