aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/eclipse/handlers/HandleGetter.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-08-27 23:05:14 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-08-27 23:05:14 +0200
commitfe0da3f53f1e88b704e21463cc5fea3d998e394a (patch)
treefa97c0d94a562dd7dd862a5d8e6e2f1ac432d060 /src/lombok/eclipse/handlers/HandleGetter.java
parente6bb460e2b1ba49698e5306ddcb5ce38748e2dfc (diff)
downloadlombok-fe0da3f53f1e88b704e21463cc5fea3d998e394a.tar.gz
lombok-fe0da3f53f1e88b704e21463cc5fea3d998e394a.tar.bz2
lombok-fe0da3f53f1e88b704e21463cc5fea3d998e394a.zip
Now @Nullable is also copied over.
Diffstat (limited to 'src/lombok/eclipse/handlers/HandleGetter.java')
-rw-r--r--src/lombok/eclipse/handlers/HandleGetter.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lombok/eclipse/handlers/HandleGetter.java b/src/lombok/eclipse/handlers/HandleGetter.java
index 6a4c5ceb..5fb7876a 100644
--- a/src/lombok/eclipse/handlers/HandleGetter.java
+++ b/src/lombok/eclipse/handlers/HandleGetter.java
@@ -113,9 +113,10 @@ public class HandleGetter implements EclipseAnnotationHandler<Getter> {
}
MethodDeclaration method = generateGetter((TypeDeclaration) fieldNode.up().get(), field, getterName, modifier, pos);
- Annotation[] nonNulls = findNonNullAnnotations(field);
- if (nonNulls.length != 0) {
- method.annotations = copyAnnotations(nonNulls);
+ Annotation[] copiedAnnotations = copyAnnotations(
+ findAnnotations(field, NON_NULL_PATTERN), findAnnotations(field, NULLABLE_PATTERN));
+ if (copiedAnnotations.length != 0) {
+ method.annotations = copiedAnnotations;
}
injectMethod(fieldNode.up(), method);