aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/HandleBuilder.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-07-03 04:17:47 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-07-03 05:42:34 +0200
commit3987f54b8321ae666cb1c774aef5986df05bf4ad (patch)
treeda0c53aa062e8e0168d22564995ba6de61577ceb /src/core/lombok/javac/handlers/HandleBuilder.java
parent577ce94facde1092ab2eec9de12270183e8048bc (diff)
downloadlombok-3987f54b8321ae666cb1c774aef5986df05bf4ad.tar.gz
lombok-3987f54b8321ae666cb1c774aef5986df05bf4ad.tar.bz2
lombok-3987f54b8321ae666cb1c774aef5986df05bf4ad.zip
[issue #1347] When lombok generates constructors, it should call the `@Builder.Default` static method instead of initializing to null/0/false. This does that, for javac.
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleBuilder.java')
-rw-r--r--src/core/lombok/javac/handlers/HandleBuilder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java
index d56d6ac2..fa887974 100644
--- a/src/core/lombok/javac/handlers/HandleBuilder.java
+++ b/src/core/lombok/javac/handlers/HandleBuilder.java
@@ -144,7 +144,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
boolean valuePresent = (hasAnnotation(lombok.Value.class, parent) || hasAnnotation("lombok.experimental.Value", parent));
for (JavacNode fieldNode : HandleConstructor.findAllFields(tdParent, true)) {
JCVariableDecl fd = (JCVariableDecl) fieldNode.get();
- JavacNode isDefault = findAnnotation(Builder.Default.class, fieldNode, true);
+ JavacNode isDefault = findAnnotation(Builder.Default.class, fieldNode, false);
boolean isFinal = (fd.mods.flags & Flags.FINAL) != 0 || (valuePresent && !hasAnnotation(NonFinal.class, fieldNode));
BuilderFieldData bfd = new BuilderFieldData();
bfd.rawName = fd.name;