Working around newly introduced lint errors in javac9.

This commit is contained in:
Reinier Zwitserloot committed 2017-12-05 00:00:08 +01:00
1 parent 003832670e
commit a92117574e
1 file changed
+4
@@ -52,6 +52,10 @@ public class CapturingDiagnosticListener implements DiagnosticListener<JavaFileO
"^" + Pattern.quote(file.getAbsolutePath()) +
"\\s*:\\s*\\d+\\s*:\\s*(?:warning:\\s*)?(.*)$", Pattern.DOTALL).matcher(msg);
if (m.matches()) msg = m.group(1);
if (msg.equals("deprecated item is not annotated with @Deprecated")) {
// This is new in JDK9; prior to that you don't see this. We shall ignore these.
return;
}
messages.add(new CompilerMessage(d.getLineNumber(), d.getStartPosition(), d.getKind() == Kind.ERROR, msg));
}