From 664ed48460eba30b9cab7f9298ac563c4a23c993 Mon Sep 17 00:00:00 2001 From: Jan Rieke Date: Thu, 31 May 2018 14:53:20 +0200 Subject: javac: delete @SuperBuilder when processing it --- src/core/lombok/javac/handlers/HandleSuperBuilder.java | 1 + test/transform/resource/after-delombok/SuperBuilderBasic.java | 2 -- .../resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java | 2 -- test/transform/resource/after-delombok/SuperBuilderWithGenerics.java | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/core/lombok/javac/handlers/HandleSuperBuilder.java b/src/core/lombok/javac/handlers/HandleSuperBuilder.java index 116de47b..1055a11a 100644 --- a/src/core/lombok/javac/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/javac/handlers/HandleSuperBuilder.java @@ -95,6 +95,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { @Override public void handle(AnnotationValues annotation, JCAnnotation ast, JavacNode annotationNode) { SuperBuilder superbuilderAnnotation = annotation.getInstance(); + deleteAnnotationIfNeccessary(annotationNode, SuperBuilder.class); String builderMethodName = superbuilderAnnotation.builderMethodName(); String buildMethodName = superbuilderAnnotation.buildMethodName(); diff --git a/test/transform/resource/after-delombok/SuperBuilderBasic.java b/test/transform/resource/after-delombok/SuperBuilderBasic.java index 47f0ff3f..18a98af3 100644 --- a/test/transform/resource/after-delombok/SuperBuilderBasic.java +++ b/test/transform/resource/after-delombok/SuperBuilderBasic.java @@ -1,6 +1,5 @@ import java.util.List; public class SuperBuilderBasic { - @lombok.experimental.SuperBuilder public static class Parent { int field1; List items; @@ -79,7 +78,6 @@ public class SuperBuilderBasic { return new ParentBuilderImpl(); } } - @lombok.experimental.SuperBuilder public static class Child extends Parent { double field3; @java.lang.SuppressWarnings("all") diff --git a/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java b/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java index 4d451558..21a9db07 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java @@ -1,6 +1,5 @@ import java.util.List; public class SuperBuilderWithCustomBuilderMethod { - @lombok.experimental.SuperBuilder public static class Parent { A field1; List items; @@ -79,7 +78,6 @@ public class SuperBuilderWithCustomBuilderMethod { return new ParentBuilderImpl(); } } - @lombok.experimental.SuperBuilder public static class Child extends Parent { double field3; public static ChildBuilder builder() { diff --git a/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java b/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java index 34a61f09..c24b473e 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java @@ -1,6 +1,5 @@ import java.util.List; public class SuperBuilderWithGenerics { - @lombok.experimental.SuperBuilder public static class Parent { A field1; List items; @@ -79,7 +78,6 @@ public class SuperBuilderWithGenerics { return new ParentBuilderImpl(); } } - @lombok.experimental.SuperBuilder public static class Child extends Parent { double field3; @java.lang.SuppressWarnings("all") -- cgit