diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-07-03 04:17:47 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-07-03 05:42:34 +0200 |
commit | 3987f54b8321ae666cb1c774aef5986df05bf4ad (patch) | |
tree | da0c53aa062e8e0168d22564995ba6de61577ceb /src/core/lombok/javac/handlers/HandleBuilder.java | |
parent | 577ce94facde1092ab2eec9de12270183e8048bc (diff) | |
download | lombok-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.java | 2 |
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; |