aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changelog.markdown1
-rwxr-xr-xsrc/core/lombok/eclipse/handlers/HandleBuilder.java2
-rw-r--r--src/core/lombok/javac/handlers/HandleBuilder.java2
3 files changed, 3 insertions, 2 deletions
diff --git a/doc/changelog.markdown b/doc/changelog.markdown
index 864f93db..64ddcc7f 100644
--- a/doc/changelog.markdown
+++ b/doc/changelog.markdown
@@ -7,6 +7,7 @@ Lombok Changelog
* BUGFIX: var/val on methods that return an intersection type would now work in Eclipse. [Issue #1986](https://github.com/rzwitserloot/lombok/issues/1986)
* BUGFIX: Fix for java6 regression if a field has javadoc. [Issue #2066](https://github.com/rzwitserloot/lombok/issues/2066)
* BUGFIX: Delombok now delomboks java10's own `var` as `var` and not as the actual underlying type. [Issue #2049](https://github.com/rzwitserloot/lombok/issues/2049)
+* BUGFIX: If you use `@Builder` and manually write the `build()` method in your builder class, javac would error out instead of deferring to your implementation. [Issue #2050](https://github.com/rzwitserloot/lombok/issues/2050) [Issue #2061](https://github.com/rzwitserloot/lombok/issues/2061)
* IMPROBABLE BREAKING CHANGE: For fields and parameters marked non-null, if the method body starts with an assert statement to ensure the value isn't null, no code to throw an exception will be generated.
### v1.18.6 (February 12th, 2019)
diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java
index 3adbc27c..7a831f3d 100755
--- a/src/core/lombok/eclipse/handlers/HandleBuilder.java
+++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java
@@ -170,7 +170,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
List<char[]> typeArgsForToBuilder = null;
if (builderMethodName == null) builderMethodName = "builder";
- if (buildMethodName == null) builderMethodName = "build";
+ if (buildMethodName == null) buildMethodName = "build";
if (builderClassName == null) builderClassName = "";
boolean generateBuilderMethod;
diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java
index 2ef2fac2..d6fb9728 100644
--- a/src/core/lombok/javac/handlers/HandleBuilder.java
+++ b/src/core/lombok/javac/handlers/HandleBuilder.java
@@ -417,7 +417,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
}
{
- MemberExistsResult methodExists = methodExists(builderMethodName, builderType, -1);
+ MemberExistsResult methodExists = methodExists(buildMethodName, builderType, -1);
if (methodExists == MemberExistsResult.EXISTS_BY_LOMBOK) methodExists = methodExists(buildMethodName, builderType, 0);
if (methodExists == MemberExistsResult.NOT_EXISTS) {
JCMethodDecl md = generateBuildMethod(tdParent, isStatic, buildMethodName, nameOfBuilderMethod, returnType, builderFields, builderType, thrownExceptions, ast, addCleaning);