8323839: Expand use of Messager convenience methods in langtools regression tests
Reviewed-by: jjg
This commit is contained in:
parent
43d2d68da5
commit
d8b63370f3
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1781,7 +1781,7 @@ public class AnnotationProcessing extends ModuleTestBase {
|
||||
if (type == null) {
|
||||
throw new AssertionError("Did not find the expected type.");
|
||||
} else {
|
||||
processingEnv.getMessager().printMessage(Kind.NOTE, name + " found in module: " + processingEnv.getElementUtils().getModuleOf(type));
|
||||
processingEnv.getMessager().printNote(name + " found in module: " + processingEnv.getElementUtils().getModuleOf(type));
|
||||
}
|
||||
} else {
|
||||
if (type != null) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,7 +50,7 @@ public class Processor extends AbstractProcessor {
|
||||
|
||||
@Override
|
||||
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
|
||||
processingEnv.getMessager().printMessage(Kind.NOTE, "round " + round);
|
||||
processingEnv.getMessager().printNote("round " + round);
|
||||
Element t = processingEnv.getElementUtils().getTypeElement("T8268575");
|
||||
for (Element e : t.getEnclosedElements()) {
|
||||
if (e instanceof ExecutableElement) {
|
||||
|
@ -19,8 +19,8 @@ public class TestMultipleErrors extends JavacTestingAbstractProcessor {
|
||||
@Override
|
||||
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
|
||||
for (Element root : roundEnv.getRootElements()) {
|
||||
processingEnv.getMessager().printMessage(Kind.ERROR, "error1", root);
|
||||
processingEnv.getMessager().printMessage(Kind.ERROR, "error2", root);
|
||||
processingEnv.getMessager().printError("error1", root);
|
||||
processingEnv.getMessager().printError("error2", root);
|
||||
|
||||
Trees trees = Trees.instance(processingEnv);
|
||||
TreePath path = trees.getPath(root);
|
||||
|
@ -21,7 +21,7 @@ public class T6362067 extends JavacTestingAbstractProcessor {
|
||||
RoundEnvironment roundEnv) {
|
||||
|
||||
for (Element e: roundEnv.getRootElements()) {
|
||||
messager.printMessage(NOTE, "note:elem", e);
|
||||
messager.printNote("note:elem", e);
|
||||
for (AnnotationMirror a: e.getAnnotationMirrors()) {
|
||||
messager.printMessage(NOTE, "note:anno", e, a);
|
||||
for (AnnotationValue v: a.getElementValues().values()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -96,7 +96,7 @@ public class TestMissingElement extends JavacTestingAbstractProcessor {
|
||||
|
||||
private void checkEqual(String label, TypeElement te, String found, String expect) {
|
||||
if (found.equals(expect)) {
|
||||
// messager.printMessage(NOTE, "expected " + label + " found: " + expect, te);
|
||||
// messager.printNote("expected " + label + " found: " + expect, te);
|
||||
} else {
|
||||
out.println("unexpected " + label + ": " + te + "\n"
|
||||
+ " found: " + found + "\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user