diff options
author | cushon <cushon@google.com> | 2018-03-29 11:21:27 -0700 |
---|---|---|
committer | Ivan Gavrilovic <gavra@google.com> | 2018-05-04 10:40:31 +0100 |
commit | 84e656e907d9ec9cc152359c56cdd676de581dfa (patch) | |
tree | 945051a7b2e889e4f6aadd34b778e1852c3c1818 | |
parent | 6227f0cb24cbe58be9847a356e97205a5ba17f61 (diff) | |
download | desugar-84e656e907d9ec9cc152359c56cdd676de581dfa.tar.gz |
Support source versions newer than 8 in Bazel's annotation processors
This quiets some build warnings.
PiperOrigin-RevId: 190958692
GitOrigin-RevId: eef80048e2c59e3be974144ce9cd90b9f90294fb
Change-Id: Ibf4e681bfc1ef540c2012df32d2970ed71240e65
-rw-r--r-- | java/com/google/devtools/common/options/processor/OptionProcessor.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/java/com/google/devtools/common/options/processor/OptionProcessor.java b/java/com/google/devtools/common/options/processor/OptionProcessor.java index 76b9640..5190053 100644 --- a/java/com/google/devtools/common/options/processor/OptionProcessor.java +++ b/java/com/google/devtools/common/options/processor/OptionProcessor.java @@ -36,7 +36,6 @@ import javax.annotation.processing.Messager; import javax.annotation.processing.ProcessingEnvironment; 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.AnnotationMirror; import javax.lang.model.element.Element; @@ -74,7 +73,6 @@ import javax.tools.Diagnostic; * <p>These properties can be relied upon at runtime without additional checks. */ @SupportedAnnotationTypes({"com.google.devtools.common.options.Option"}) -@SupportedSourceVersion(SourceVersion.RELEASE_8) public final class OptionProcessor extends AbstractProcessor { private Types typeUtils; @@ -84,6 +82,11 @@ public final class OptionProcessor extends AbstractProcessor { private ImmutableMap<Class<?>, PrimitiveType> primitiveTypeMap; @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latestSupported(); + } + + @Override public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); typeUtils = processingEnv.getTypeUtils(); |