From a9ed18ac85faf01b23a9d76b6d5c4d46f23d137d Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 20 Jul 2010 12:06:20 +0200 Subject: bugfix: The previous fix to stop removal of lombok annotations unless delombok is running actually only worked for the import, and still deleted the annotation. No longer. --- src/core/lombok/javac/handlers/JavacHandlerUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index 0df48358..9ac84bd1 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -63,10 +63,12 @@ public class JavacHandlerUtil { } /** - * Removes the annotation from javac's AST, then removes it from lombok's AST, + * Removes the annotation from javac's AST (it remains in lombok's AST), * then removes any import statement that imports this exact annotation (not star imports). + * Only does this if the DeleteLombokAnnotations class is in the context. */ public static void markAnnotationAsProcessed(JavacNode annotation, Class annotationType) { + if (!annotation.shouldDeleteLombokAnnotations()) return; JavacNode parentNode = annotation.directUp(); switch (parentNode.getKind()) { case FIELD: -- cgit