diff options
author | Jan Rieke <rieke@subshell.com> | 2021-07-21 13:54:54 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2022-01-09 01:36:22 +0100 |
commit | ae8ff327d2734e373df2839335ba9b1923c6eb67 (patch) | |
tree | 55c94c8d02fa0fc4d60f8faa29fc44d67e2cc9dd /src/core/lombok/eclipse/handlers/HandleSetter.java | |
parent | 9be867ef03b77e0455a45d22e4a8cd7c5fa9af61 (diff) | |
download | lombok-ae8ff327d2734e373df2839335ba9b1923c6eb67.tar.gz lombok-ae8ff327d2734e373df2839335ba9b1923c6eb67.tar.bz2 lombok-ae8ff327d2734e373df2839335ba9b1923c6eb67.zip |
[fixes #3081] make CheckerFramework's This a type annotation
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleSetter.java')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleSetter.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSetter.java b/src/core/lombok/eclipse/handlers/HandleSetter.java index ddae21fb..0fdd058f 100644 --- a/src/core/lombok/eclipse/handlers/HandleSetter.java +++ b/src/core/lombok/eclipse/handlers/HandleSetter.java @@ -34,7 +34,6 @@ import lombok.AccessLevel; import lombok.ConfigurationKeys; import lombok.Setter; import lombok.core.AST.Kind; -import lombok.core.configuration.CheckerFrameworkVersion; import lombok.core.AnnotationValues; import lombok.eclipse.EclipseAnnotationHandler; import lombok.eclipse.EclipseNode; @@ -191,14 +190,12 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> { ReturnStatement returnThis = null; if (shouldReturnThis) { returnType = cloneSelfType(fieldNode, source); + addCheckerFrameworkReturnsReceiver(returnType, source, getCheckerFrameworkVersion(sourceNode)); ThisReference thisRef = new ThisReference(pS, pE); returnThis = new ReturnStatement(thisRef, pS, pE); } MethodDeclaration d = createSetter(parent, deprecate, fieldNode, name, paramName, booleanFieldToSet, returnType, returnThis, modifier, sourceNode, onMethod, onParam); - if (shouldReturnThis && getCheckerFrameworkVersion(sourceNode).generateReturnsReceiver()) { - d.annotations = copyAnnotations(source, d.annotations, new Annotation[] { generateNamedAnnotation(source, CheckerFrameworkVersion.NAME__RETURNS_RECEIVER) }); - } return d; } |