Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
Expand All @@ -61,7 +60,6 @@

@AutoService(Processor.class)
@SupportedAnnotationTypes("feign.graphql.GraphqlSchema")
@SupportedSourceVersion(SourceVersion.RELEASE_17)
public class GraphqlSchemaProcessor extends AbstractProcessor {

private Filer filer;
Expand All @@ -74,6 +72,11 @@ public synchronized void init(ProcessingEnvironment processingEnv) {
this.messager = processingEnv.getMessager();
}

@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
}

@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
for (var element : roundEnv.getElementsAnnotatedWith(GraphqlSchema.class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ mutation createCharacter($input: CreateCharacterInput!) {
var compilation = javac().withProcessors(new GraphqlSchemaProcessor()).compile(source);

assertThat(compilation).succeeded();
assertThat(compilation).hadWarningCount(0);
assertThat(compilation).generatedSourceFile("test.CreateCharacterResult");
assertThat(compilation).generatedSourceFile("test.CreateCharacterInput");
}
Expand Down