test/tools/javac/T6403466.java
Print this page
@@ -39,11 +39,10 @@
import javax.tools.*;
import com.sun.tools.javac.api.JavacTool;
@Wrap
@SupportedAnnotationTypes("Wrap")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
public class T6403466 extends AbstractProcessor {
static final String testSrcDir = System.getProperty("test.src");
static final String testClassDir = System.getProperty("test.classes");
static final String self = T6403466.class.getName();
@@ -71,10 +70,11 @@
if (vtl.iter.hasNext() || vtl.errors)
throw new AssertionError("comparison against golden file failed.");
}
public boolean process(Set<? extends TypeElement> annos, RoundEnvironment rEnv) {
+ if (!rEnv.processingOver()) {
Filer filer = processingEnv.getFiler();
for (TypeElement anno: annos) {
Set<? extends Element> elts = rEnv.getElementsAnnotatedWith(anno);
System.err.println("anno: " + anno);
System.err.println("elts: " + elts);
@@ -87,12 +87,18 @@
ex.printStackTrace();
}
}
}
+ }
return true;
}
+
+ @Override
+ public SourceVersion getSupportedSourceVersion() {
+ return SourceVersion.latest();
+ }
}
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
@interface Wrap {