7133314: The regression test for 7129225 fails when run with jtreg -samevm or jtreg -agentvm
Reviewed-by: jjg
--- a/langtools/test/tools/javac/7129225/AnnoProcessor.java Tue Jan 24 16:31:15 2012 -0800
+++ b/langtools/test/tools/javac/7129225/AnnoProcessor.java Wed Jan 25 12:20:05 2012 -0800
@@ -27,9 +27,10 @@
import javax.annotation.processing.*;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.TypeElement;
+import javax.tools.Diagnostic.Kind;
@SupportedAnnotationTypes("Anno")
-public class AnnoProcessor extends AbstractProcessor {
+public class AnnoProcessor extends JavacTestingAbstractProcessor {
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latest();
@@ -37,7 +38,8 @@
@Override
public boolean process(Set<? extends TypeElement> set, RoundEnvironment re) {
- System.out.println("RUNNING...");
+ messager.printMessage(Kind.NOTE, "RUNNING - lastRound = " + re.processingOver());
return true;
}
}
+
--- a/langtools/test/tools/javac/7129225/NegTest.ref Tue Jan 24 16:31:15 2012 -0800
+++ b/langtools/test/tools/javac/7129225/NegTest.ref Wed Jan 25 12:20:05 2012 -0800
@@ -1,2 +1,2 @@
-TestImportStar.java:37:1: compiler.err.doesnt.exist: xxx
+TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
1 error
--- a/langtools/test/tools/javac/7129225/TestImportStar.java Tue Jan 24 16:31:15 2012 -0800
+++ b/langtools/test/tools/javac/7129225/TestImportStar.java Wed Jan 25 12:20:05 2012 -0800
@@ -26,6 +26,8 @@
/* @test
* @bug 7129225
* @summary import xxx.* isn't handled correctly by annotation processing
+ * @library ../lib
+ * @build JavacTestingAbstractProcessor
* @compile/fail/ref=NegTest.ref -XDrawDiagnostics TestImportStar.java
* @compile Anno.java AnnoProcessor.java
* @compile/ref=TestImportStar.ref -XDrawDiagnostics -processor AnnoProcessor -proc:only TestImportStar.java
--- a/langtools/test/tools/javac/7129225/TestImportStar.ref Tue Jan 24 16:31:15 2012 -0800
+++ b/langtools/test/tools/javac/7129225/TestImportStar.ref Wed Jan 25 12:20:05 2012 -0800
@@ -1,3 +1,3 @@
-RUNNING...
-RUNNING...
-TestImportStar.java:37:1: compiler.err.doesnt.exist: xxx
+- compiler.note.proc.messager: RUNNING - lastRound = false
+TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
+- compiler.note.proc.messager: RUNNING - lastRound = true