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

Print this page

        

*** 32,48 **** import java.util.Set; import javax.annotation.processing.*; import javax.lang.model.element.*; import javax.lang.model.util.*; 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) { --- 32,47 ---- 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.*; @interface TestMe {} @SupportedAnnotationTypes("*") public class T6424358 extends AbstractProcessor { @TestMe enum Test { FOO; } public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) {
*** 64,69 **** --- 63,73 ---- Scan scan = new Scan(); for (Element e : roundEnvironment.getElementsAnnotatedWith(testMe)) scan.scan(e); return true; } + + @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } }