< prev index next >
test/langtools/lib/combo/tools/javac/combo/Diagnostics.java
Print this page
rev 51258 : imported patch switch.diff
@@ -63,10 +63,17 @@
return diags.stream()
.filter(d -> d.getKind() == Diagnostic.Kind.ERROR)
.anyMatch(d -> d.getCode().equals(key));
}
+ /** Do the diagnostics contain the specified warning key? */
+ public boolean containsWarningKey(String key) {
+ return diags.stream()
+ .filter(d -> d.getKind() == Diagnostic.Kind.WARNING)
+ .anyMatch(d -> d.getCode().equals(key));
+ }
+
/** Get the error keys */
public List<String> errorKeys() {
return diags.stream()
.filter(d -> d.getKind() == Diagnostic.Kind.ERROR)
.map(Diagnostic::getCode)
< prev index next >