From 0ec30d453342f128b70bca0c2e7fe7afd31a193e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Drobni=C4=8D?= Date: Mon, 5 Oct 2020 09:57:23 +0200 Subject: [PATCH] [pigeon] Suppress more warnings on the java side At the moment, Pigeon will still generate code with a bunch of warnings which pollute IDE's warning lists. This should ignore all the extra warnings. --- packages/pigeon/lib/java_generator.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/lib/java_generator.dart b/packages/pigeon/lib/java_generator.dart index c1a610f95d6b..7eda8be9632d 100644 --- a/packages/pigeon/lib/java_generator.dart +++ b/packages/pigeon/lib/java_generator.dart @@ -238,7 +238,7 @@ void generateJava(JavaOptions options, Root root, StringSink sink) { indent.addln(''); assert(options.className != null); indent.writeln('/** Generated class from Pigeon. */'); - indent.writeln('@SuppressWarnings("unused")'); + indent.writeln('@SuppressWarnings({"rawtypes", "unused", "CodeBlock2Expr", "ConstantConditions"})'); indent.write('public class ${options.className} '); indent.scoped('{', '}', () { for (Class klass in root.classes) {