Merge pull request #3198 from Rawi01/builder-refactoring

Copy field name arrays in (Super)Builder
This commit is contained in:
Reinier Zwitserloot authored and GitHub committed 2023-01-12 00:28:16 +01:00
commit c16f6e9084
2 files changed
+2 -2

No files matched your search

@@ -983,7 +983,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
}
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);
@@ -948,7 +948,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> {
}
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);