aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers/HandleSetter.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-31 15:58:19 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-31 15:58:19 +0100
commit3f0fec18726fb9c9f4dce614dbcfa650c1c04bf7 (patch)
treed03abb38a198bbe5417e3aa1e1f7c55b03f32e63 /src/core/lombok/eclipse/handlers/HandleSetter.java
parentc42bfbae39990b365a5f05eb23895da6203023bc (diff)
downloadlombok-3f0fec18726fb9c9f4dce614dbcfa650c1c04bf7.tar.gz
lombok-3f0fec18726fb9c9f4dce614dbcfa650c1c04bf7.tar.bz2
lombok-3f0fec18726fb9c9f4dce614dbcfa650c1c04bf7.zip
[issue #788] Add more nullity annotations where relevant
(chainable setters, static constructors, builder stuff)
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleSetter.java')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSetter.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSetter.java b/src/core/lombok/eclipse/handlers/HandleSetter.java
index 8ee54d0f..cb2ca3bf 100644
--- a/src/core/lombok/eclipse/handlers/HandleSetter.java
+++ b/src/core/lombok/eclipse/handlers/HandleSetter.java
@@ -260,6 +260,8 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
method.statements = statements.toArray(new Statement[0]);
param.annotations = copyAnnotations(source, copyableAnnotations, onParam.toArray(new Annotation[0]));
+ if (returnType != null && returnStatement != null) createRelevantNonNullAnnotation(sourceNode, method);
+
method.traverse(new SetGeneratedByVisitor(source), parent.scope);
return method;
}