1.1 --- a/test/tools/javac/processing/messager/6362067/T6362067.java Wed Sep 29 14:01:37 2010 -0700 1.2 +++ b/test/tools/javac/processing/messager/6362067/T6362067.java Wed Sep 29 23:27:57 2010 -0700 1.3 @@ -2,39 +2,34 @@ 1.4 * @test /nodynamiccopyright/ 1.5 * @bug 6362067 1.6 * @summary Messager methods do not print out source position information 1.7 - * @build T6362067 1.8 + * @library ../../../lib 1.9 + * @build JavacTestingAbstractProcessor T6362067 1.10 * @compile -processor T6362067 -proc:only T6362067.java 1.11 * @compile/ref=T6362067.out -XDrawDiagnostics -processor T6362067 -proc:only T6362067.java 1.12 */ 1.13 - 1.14 import java.util.Set; 1.15 import javax.annotation.processing.*; 1.16 import javax.lang.model.element.*; 1.17 import static javax.tools.Diagnostic.Kind.*; 1.18 1.19 -@Deprecated // convenient test annotation 1.20 -@SupportedAnnotationTypes("*") 1.21 -public class T6362067 extends AbstractProcessor { 1.22 +@Deprecated // convenient test annotations 1.23 +@SuppressWarnings({""}) 1.24 +public class T6362067 extends JavacTestingAbstractProcessor { 1.25 public boolean process(Set<? extends TypeElement> annos, 1.26 RoundEnvironment roundEnv) { 1.27 - Messager msgr = processingEnv.getMessager(); 1.28 + 1.29 for (Element e: roundEnv.getRootElements()) { 1.30 - msgr.printMessage(NOTE, "note:elem", e); 1.31 + messager.printMessage(NOTE, "note:elem", e); 1.32 for (AnnotationMirror a: e.getAnnotationMirrors()) { 1.33 - msgr.printMessage(NOTE, "note:anno", e, a); 1.34 + messager.printMessage(NOTE, "note:anno", e, a); 1.35 for (AnnotationValue v: a.getElementValues().values()) { 1.36 - msgr.printMessage(NOTE, "note:value", e, a, v); 1.37 + messager.printMessage(NOTE, "note:value", e, a, v); 1.38 } 1.39 - 1.40 } 1.41 } 1.42 + 1.43 if (roundEnv.processingOver()) 1.44 - msgr.printMessage(NOTE, "note:nopos"); 1.45 + messager.printMessage(NOTE, "note:nopos"); 1.46 return true; 1.47 } 1.48 - 1.49 - @Override 1.50 - public javax.lang.model.SourceVersion getSupportedSourceVersion() { 1.51 - return javax.lang.model.SourceVersion.latest(); 1.52 - } 1.53 }