Skip to content

Commit 9df44c1

Browse files
committed
fix(processor): avoid re-processing EnableFlamingock annotation in later rounds (#731)
Previously the Flamingock annotation processor was executed on every round. When used together with Lombok, the @EnableFlamingock annotation could be removed in a later round, causing the processor to fail. This change ensures the processor runs only when needed, preventing the issue triggered when Lombok rewrites annotated classes. Closes #729.
1 parent e9b5d06 commit 9df44c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/flamingock-processor/src/main/java/io/flamingock/core/processor/FlamingockAnnotationProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public class FlamingockAnnotationProcessor extends AbstractProcessor {
152152
);
153153

154154

155-
private static final boolean hasProcessed = false;
155+
private static boolean hasProcessed = false;
156156

157157
private String resourcesRoot = null;
158158
private List<String> sourceRoots = null;
@@ -215,6 +215,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
215215
FlamingockMetadata flamingockMetadata = new FlamingockMetadata(pipeline, setup, configFile);
216216
serializer.serializeFullPipeline(flamingockMetadata);
217217
logger.info("Finished processing annotated classes and generating metadata.");
218+
hasProcessed = true;
218219
return true;
219220
}
220221

0 commit comments

Comments
 (0)