aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers/HandleGetter.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-01-29 21:32:56 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-01-29 21:32:56 +0100
commita312ae9cdbdb516fdadb281f4e76c4747402e3ca (patch)
tree4c10f1b94f9474cf4fa333ff836e605552935699 /src/core/lombok/eclipse/handlers/HandleGetter.java
parent3388f685159d05f6a4d0575d5c14224b35110bf8 (diff)
downloadlombok-a312ae9cdbdb516fdadb281f4e76c4747402e3ca.tar.gz
lombok-a312ae9cdbdb516fdadb281f4e76c4747402e3ca.tar.bz2
lombok-a312ae9cdbdb516fdadb281f4e76c4747402e3ca.zip
Reverting the revert of purely a style issue; the copyAnnotations method is now ‘nicer’ and no longer requires having to deal with the fact that it can return both ‘null’ AND empty arrays.
Thanks to Maaartin Gracjar for setting this change in motion in commit 842a4759165c5cd05aae63da3921ee11a3641a4b.
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleGetter.java')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleGetter.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleGetter.java b/src/core/lombok/eclipse/handlers/HandleGetter.java
index 031fff82..14f2fb72 100644
--- a/src/core/lombok/eclipse/handlers/HandleGetter.java
+++ b/src/core/lombok/eclipse/handlers/HandleGetter.java
@@ -270,14 +270,12 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
deprecated = new Annotation[] { generateDeprecatedAnnotation(source) };
}
- Annotation[] copiedAnnotations = copyAnnotations(source,
+ method.annotations = copyAnnotations(source,
onMethod.toArray(new Annotation[0]),
findAnnotations(field, NON_NULL_PATTERN),
findAnnotations(field, NULLABLE_PATTERN),
findDelegatesAndMarkAsHandled(fieldNode),
deprecated);
-
- if (copiedAnnotations.length != 0) method.annotations = copiedAnnotations;
}
method.traverse(new SetGeneratedByVisitor(source), parent.scope);