aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers/HandleSetter.java
diff options
context:
space:
mode:
authorMaaartin Grajcar <grajcar@seznam.cz>2014-05-31 00:13:11 +0200
committerMaaartin Grajcar <grajcar@seznam.cz>2014-05-31 18:24:22 +0200
commit842a4759165c5cd05aae63da3921ee11a3641a4b (patch)
tree3dbcc52228e0bc1ef96b7642e49b7286b30721fe /src/core/lombok/eclipse/handlers/HandleSetter.java
parent06371ca2580dc9938e07a9ff0ab86a72ab10fa2f (diff)
downloadlombok-842a4759165c5cd05aae63da3921ee11a3641a4b.tar.gz
lombok-842a4759165c5cd05aae63da3921ee11a3641a4b.tar.bz2
lombok-842a4759165c5cd05aae63da3921ee11a3641a4b.zip
Remove a wrong test for copyAnnotations returning empty array.
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleSetter.java')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSetter.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSetter.java b/src/core/lombok/eclipse/handlers/HandleSetter.java
index c22af676..e2bbea37 100644
--- a/src/core/lombok/eclipse/handlers/HandleSetter.java
+++ b/src/core/lombok/eclipse/handlers/HandleSetter.java
@@ -216,10 +216,8 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
if (isFieldDeprecated(fieldNode)) {
deprecated = new Annotation[] { generateDeprecatedAnnotation(source) };
}
- Annotation[] copiedAnnotations = copyAnnotations(source, onMethod.toArray(new Annotation[0]), deprecated);
- if (copiedAnnotations.length != 0) {
- method.annotations = copiedAnnotations;
- }
+ method.annotations = copyAnnotations(source, onMethod.toArray(new Annotation[0]), deprecated);
+
Argument param = new Argument(field.name, p, copyType(field.type, source), Modifier.FINAL);
param.sourceStart = pS; param.sourceEnd = pE;
method.arguments = new Argument[] { param };
@@ -253,8 +251,7 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
}
method.statements = statements.toArray(new Statement[0]);
- Annotation[] copiedAnnotationsParam = copyAnnotations(source, nonNulls, nullables, onParam.toArray(new Annotation[0]));
- if (copiedAnnotationsParam.length != 0) param.annotations = copiedAnnotationsParam;
+ param.annotations = copyAnnotations(source, nonNulls, nullables, onParam.toArray(new Annotation[0]));
method.traverse(new SetGeneratedByVisitor(source), parent.scope);
return method;