Clean up warnings
-Xlint:-options is not available on some earlier JDK 7s, but won't fail
if unsupported. It prevents the warning wanting bootclasspath specified
since target/source is 1.6.
diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp
index b2b3894..e74f18e 100644
--- a/compiler/src/java_plugin/cpp/java_generator.cpp
+++ b/compiler/src/java_plugin/cpp/java_generator.cpp
@@ -167,7 +167,8 @@
// The reconfiguring constructor
p->Print(
*vars,
- "\nprivate $service_name$ServiceDescriptor(\n"
+ "\n@SuppressWarnings(\"unchecked\")\n"
+ "private $service_name$ServiceDescriptor(\n"
" $Map$<$String$, $MethodDescriptor$<?, ?>> methodMap) {\n");
p->Indent();
for (int i = 0; i < service->method_count(); ++i) {
diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt
index 46f7116..a19f90c 100644
--- a/compiler/src/test/golden/TestService.java.txt
+++ b/compiler/src/test/golden/TestService.java.txt
@@ -90,6 +90,7 @@
"grpc.testing.TestService", METHOD_HALF_DUPLEX_CALL);
}
+ @SuppressWarnings("unchecked")
private TestServiceServiceDescriptor(
java.util.Map<java.lang.String, io.grpc.MethodDescriptor<?, ?>> methodMap) {
unaryCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
diff --git a/compiler/src/test/golden/TestServiceNano.java.txt b/compiler/src/test/golden/TestServiceNano.java.txt
index 18f40fd..7e12113 100644
--- a/compiler/src/test/golden/TestServiceNano.java.txt
+++ b/compiler/src/test/golden/TestServiceNano.java.txt
@@ -152,6 +152,7 @@
"grpc.testing.TestService", METHOD_HALF_DUPLEX_CALL);
}
+ @SuppressWarnings("unchecked")
private TestServiceServiceDescriptor(
java.util.Map<java.lang.String, io.grpc.MethodDescriptor<?, ?>> methodMap) {
unaryCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,