Skip to content

Commit

Permalink
testing-proto: Define supported SourceVersion in annotation test
Browse files Browse the repository at this point in the history
This fixes the warning during the test run:
```
warning: No SupportedSourceVersion annotation found on io.grpc.testing.protobuf.SimpleServiceTest$AnnotationProcessor, returning RELEASE_6.
warning: Supported source version 'RELEASE_6' from annotation processor 'io.grpc.testing.protobuf.SimpleServiceTest$AnnotationProcessor' less than -source '1.8'
```
  • Loading branch information
cushon authored and ejona86 committed May 18, 2023
1 parent 6fd9348 commit 478f30e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.MirroredTypeException;
Expand Down Expand Up @@ -79,6 +80,11 @@ public static class AnnotationProcessor extends AbstractProcessor {

private boolean processedClass = false;

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

@Override
public Set<String> getSupportedAnnotationTypes() {
return Collections.singleton(RpcMethod.class.getCanonicalName());
Expand Down

0 comments on commit 478f30e

Please sign in to comment.