< prev index next >

test/langtools/lib/combo/tools/javac/combo/Diagnostics.java

Print this page
rev 51104 : imported patch switch

*** 63,72 **** --- 63,79 ---- 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 >