aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-07-20 12:06:20 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-07-20 12:06:20 +0200
commita9ed18ac85faf01b23a9d76b6d5c4d46f23d137d (patch)
tree1df3a987e10f75d824a64d438d4a9767189a25a5 /src/core/lombok/javac
parentdb6a4565576b0beec5373e3927b0bff86d5ae6f7 (diff)
downloadlombok-a9ed18ac85faf01b23a9d76b6d5c4d46f23d137d.tar.gz
lombok-a9ed18ac85faf01b23a9d76b6d5c4d46f23d137d.tar.bz2
lombok-a9ed18ac85faf01b23a9d76b6d5c4d46f23d137d.zip
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.
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java4
1 files changed, 3 insertions, 1 deletions
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<? extends Annotation> annotationType) {
+ if (!annotation.shouldDeleteLombokAnnotations()) return;
JavacNode parentNode = annotation.directUp();
switch (parentNode.getKind()) {
case FIELD: