Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdaffurn committed Oct 9, 2024
1 parent 959fd2e commit b8b1b50
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,14 @@ public class EnumProcessor {
SchemaContributorBuildItem handleEnums(CombinedIndexBuildItem index, FTLRecorder recorder) {
var enumAnnotations = index.getIndex().getAnnotations(FTLDotNames.ENUM);
log.info("Processing {} enum annotations into decls", enumAnnotations.size());

return new SchemaContributorBuildItem(new Consumer<ModuleBuilder>() {
@Override
public void accept(ModuleBuilder moduleBuilder) {
try {
var decls = extractEnumDecls(index, enumAnnotations, recorder, moduleBuilder);
for (var decl : decls) {
moduleBuilder.addDecls(decl);
}
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
throw new RuntimeException(e);
return new SchemaContributorBuildItem(moduleBuilder -> {
try {
var decls = extractEnumDecls(index, enumAnnotations, recorder, moduleBuilder);
for (var decl : decls) {
moduleBuilder.addDecls(decl);
}
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
throw new RuntimeException(e);
}
});
}
Expand Down

0 comments on commit b8b1b50

Please sign in to comment.