test/tools/javac/api/6421111/T6421111.java

Print this page

        

*** 74,84 **** task.setProcessors(Collections.singleton(new MyProcessor())); if (!task.call()) throw new AssertionError("Annotation processor failed"); } @SupportedAnnotationTypes("*") - @SupportedSourceVersion(SourceVersion.RELEASE_6) static class MyProcessor extends AbstractProcessor { void test(TypeElement element, boolean fbound) { TypeParameterElement tpe = element.getTypeParameters().iterator().next(); tpe.getBounds().getClass(); if (fbound) { --- 74,83 ----
*** 94,103 **** --- 93,106 ---- RoundEnvironment roundEnv) { test(processingEnv.getElementUtils().getTypeElement("Test1"), false); test(processingEnv.getElementUtils().getTypeElement("Test2"), true); return false; } + @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } } public static void main(String... args) { new T6421111().test(args); } public static AssertionError error(String format, Object... args) {