changeset 1061:df162425ce6f

7901127: BenchmarkProcessor should report proper SourceVersion
author shade
date Thu, 18 Dec 2014 17:15:10 +0300
parents d6d10326e70f
children cfbc4996b875
files jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/BenchmarkProcessor.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/BenchmarkProcessor.java	Thu Dec 11 17:54:35 2014 +0300
+++ b/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/BenchmarkProcessor.java	Thu Dec 18 17:15:10 2014 +0300
@@ -39,12 +39,18 @@
 import java.util.Set;
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
 public class BenchmarkProcessor extends AbstractProcessor {
 
     private final BenchmarkGenerator generator = new BenchmarkGenerator();
 
     @Override
+    public SourceVersion getSupportedSourceVersion() {
+        // We may claim to support the latest version, since we are not using
+        // any version-specific extensions.
+        return SourceVersion.latest();
+    }
+
+    @Override
     public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
         GeneratorSource source = new APGeneratorSource(roundEnv, processingEnv);
         GeneratorDestination destination = new APGeneratorDestinaton(roundEnv, processingEnv);