提交 d5e8a3fe 编写于 作者: J jjh

7133314: The regression test for 7129225 fails when run with jtreg -samevm or jtreg -agentvm

Reviewed-by: jjg
上级 2ad7e87d
......@@ -27,9 +27,10 @@ import java.util.Set;
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 @@ public class AnnoProcessor extends AbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> set, RoundEnvironment re) {
System.out.println("RUNNING...");
messager.printMessage(Kind.NOTE, "RUNNING - lastRound = " + re.processingOver());
return true;
}
}
TestImportStar.java:37:1: compiler.err.doesnt.exist: xxx
TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
1 error
......@@ -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
......
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册