mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
bazel: remove javac warnings in compilation output masked as notes
GitOrigin-RevId: 51794a9b07295735dfc95324dbcbe48c4442db5c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f04943d9c8
commit
274731c1c6
+15
@@ -333,6 +333,21 @@ public class BuildContextImpl implements BuildContext {
|
||||
if (!myAllowWarnings && msg.getKind() == Message.Kind.WARNING) {
|
||||
return;
|
||||
}
|
||||
if (!myAllowWarnings) {
|
||||
// Some warnings in javac are impossible to disable
|
||||
// They're also reported as notes, not warnings
|
||||
// It greatly pollutes compilation output
|
||||
String text = msg.getText();
|
||||
if (text.startsWith("Some input files use unchecked or unsafe operations.") ||
|
||||
text.startsWith("Some input files use or override a deprecated API that is marked for removal.") ||
|
||||
text.startsWith("Some input files additionally use or override a deprecated API.") ||
|
||||
text.startsWith("Recompile with -Xlint:unchecked for details.") ||
|
||||
text.startsWith("Recompile with -Xlint:removal for details.") ||
|
||||
text.contains("uses or overrides a deprecated API that is marked for removal") ||
|
||||
text.contains("uses unchecked or unsafe operations")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (msg.getSource() != null) {
|
||||
myMessageSink.append(msg.getSource().getName()).append(": ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user