Skip to content

Commit

Permalink
Generate config metadata fix. (helidon-io#7145)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-langer authored Jul 4, 2023
1 parent 47e23a3 commit a61a942
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -75,7 +76,7 @@ class ConfigMetadataHandler {
private final Map<String, ConfiguredType> newOptions = new HashMap<>();
// map of module name to list of classes that belong to it
private final Map<String, List<String>> moduleTypes = new HashMap<>();

private final Set<Element> classesToHandle = new LinkedHashSet<>();
/*
* Compiler utilities for annotation processing
*/
Expand Down Expand Up @@ -249,9 +250,10 @@ private static String javadoc(String docComment) {
}

private boolean doProcess(RoundEnvironment roundEnv) {
// we need to collect all types for processing
classesToHandle.addAll(roundEnv.getElementsAnnotatedWith(configuredElement));
if (roundEnv.processingOver()) {
Set<? extends Element> classes = roundEnv.getElementsAnnotatedWith(configuredElement);
for (Element aClass : classes) {
for (Element aClass : classesToHandle) {
processClass(aClass);
}

Expand Down

0 comments on commit a61a942

Please sign in to comment.