test/langtools/tools/javac/annotations/typeAnnotations/failures/CheckErrorsForSource7.java
--- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CheckErrorsForSource7.java Mon Dec 04 10:13:58 2017 +0100
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CheckErrorsForSource7.java Mon Dec 04 17:54:49 2017 +0000
@@ -135,7 +135,7 @@
boolean found = false;
for (Diagnostic<? extends JavaFileObject> d : errors.getDiagnostics()) {
- if (d.getKind() == Diagnostic.Kind.ERROR && EXPECTED_ERRORS.contains(d.getCode())) {
+ if (d.getKind() == Diagnostic.Kind.ERROR && EXPECTED_ERROR.equals(d.getCode())) {
if (found) {
throw new IllegalStateException("More than one expected error found.");
}
@@ -149,10 +149,7 @@
}
}
- static final Set<String> EXPECTED_ERRORS = new HashSet<>(Arrays.asList(
- "compiler.err.type.annotations.not.supported.in.source",
- "compiler.err.annotations.after.type.params.not.supported.in.source"
- ));
+ static final String EXPECTED_ERROR = "compiler.err.feature.not.supported.in.source.plural";
class TestFO extends SimpleJavaFileObject {
private final String content;