test/tools/javac/enum/6424358/T6424358.java

Print this page

        

@@ -32,17 +32,16 @@
 
 import java.util.Set;
 import javax.annotation.processing.*;
 import javax.lang.model.element.*;
 import javax.lang.model.util.*;
+import javax.lang.model.SourceVersion;
 import static javax.tools.Diagnostic.Kind.*;
-import static javax.lang.model.SourceVersion.RELEASE_6;
 
 @interface TestMe {}
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(RELEASE_6)
 public class T6424358 extends AbstractProcessor {
     @TestMe enum Test { FOO; }
 
     public boolean process(Set<? extends TypeElement> annotations,
                            RoundEnvironment roundEnvironment) {

@@ -64,6 +63,11 @@
         Scan scan = new Scan();
         for (Element e : roundEnvironment.getElementsAnnotatedWith(testMe))
             scan.scan(e);
         return true;
     }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
 }