aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2023-01-12 01:44:52 +0100
committerGitHub <noreply@github.com>2023-01-12 01:44:52 +0100
commite90d497c93ecc7db1d5a901d40f11fc919f31447 (patch)
treee85b974b9c8bd42e1e9241d2bd3231cfecaa3ebc /src/core/lombok/eclipse/handlers
parentef916881ad85371b905b0104072df2a2b133eee8 (diff)
parentd2ae62ac71ebf55406d308dc41e76f36e7cb5ea8 (diff)
downloadlombok-e90d497c93ecc7db1d5a901d40f11fc919f31447.tar.gz
lombok-e90d497c93ecc7db1d5a901d40f11fc919f31447.tar.bz2
lombok-e90d497c93ecc7db1d5a901d40f11fc919f31447.zip
Merge pull request #3232 from janrieke/superBuilderFixMethodExistsChecks
Fix SuperBuilder for fields named "build" or "self"
Diffstat (limited to 'src/core/lombok/eclipse/handlers')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSuperBuilder.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
index 19e7c391..e91478e0 100644
--- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
+++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
@@ -386,16 +386,16 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> {
injectMethod(job.builderType, generateStaticFillValuesMethod(job, annInstance.setterPrefix()));
}
- // Generate abstract self() and build() methods in the abstract builder.
- injectMethod(job.builderType, generateAbstractSelfMethod(job, superclassBuilderClass != null, builderGenericName));
- job.setBuilderToAbstract();
- injectMethod(job.builderType, generateAbstractBuildMethod(job, superclassBuilderClass != null, classGenericName));
-
// Create the setter methods in the abstract builder.
for (BuilderFieldData bfd : job.builderFields) {
generateSetterMethodsForBuilder(job, bfd, builderGenericName, annInstance.setterPrefix());
}
+ // Generate abstract self() and build() methods in the abstract builder.
+ injectMethod(job.builderType, generateAbstractSelfMethod(job, superclassBuilderClass != null, builderGenericName));
+ job.setBuilderToAbstract();
+ injectMethod(job.builderType, generateAbstractBuildMethod(job, superclassBuilderClass != null, classGenericName));
+
// Create the toString() method for the abstract builder.
if (methodExists("toString", job.builderType, 0) == MemberExistsResult.NOT_EXISTS) {
List<Included<EclipseNode, ToString.Include>> fieldNodes = new ArrayList<Included<EclipseNode, ToString.Include>>();