From 8bc82cad05b8760aa5a01ffabaa6238b6cc535e1 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 19 Mar 2012 23:18:37 +0100 Subject: Fix for issue 342: @Deprecated annotation not propagated to generated getter/setter --- src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/eclipseAgent/lombok') diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java index acf1589d..7c73b465 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java @@ -51,11 +51,9 @@ import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.eclipse.jdt.internal.compiler.ast.Expression; import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; import org.eclipse.jdt.internal.compiler.ast.FieldReference; -import org.eclipse.jdt.internal.compiler.ast.MarkerAnnotation; import org.eclipse.jdt.internal.compiler.ast.MemberValuePair; import org.eclipse.jdt.internal.compiler.ast.MessageSend; import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; -import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference; import org.eclipse.jdt.internal.compiler.ast.ReturnStatement; import org.eclipse.jdt.internal.compiler.ast.SingleNameReference; import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference; @@ -613,11 +611,7 @@ public class PatchDelegate { } if (isDeprecated) { - QualifiedTypeReference qtr = new QualifiedTypeReference(new char[][] { - {'j', 'a', 'v', 'a'}, {'l', 'a', 'n', 'g'}, {'D', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd'}}, poss(source, 3)); - setGeneratedBy(qtr, source); - MarkerAnnotation ann = new MarkerAnnotation(qtr, pS); - method.annotations = new Annotation[] {ann}; + method.annotations = new Annotation[] { generateDeprecatedAnnotation(source) }; } method.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG; -- cgit