Add missing override annotation to generated protos
diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp
index 8be1575..53041b5 100644
--- a/compiler/src/java_plugin/cpp/java_generator.cpp
+++ b/compiler/src/java_plugin/cpp/java_generator.cpp
@@ -501,6 +501,7 @@
p->Indent();
p->Print(
*vars,
+ "@$Override$\n"
"@java.lang.SuppressWarnings(\"unchecked\")\n"
"public void invoke(Req request, $StreamObserver$<Resp> responseObserver) {\n"
" switch (methodId) {\n");
@@ -535,6 +536,7 @@
p->Print(
*vars,
+ "@$Override$\n"
"@java.lang.SuppressWarnings(\"unchecked\")\n"
"public $StreamObserver$<Req> invoke(\n"
" $StreamObserver$<Resp> responseObserver) {\n"
diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt
index 3dbaa26..e025d21 100644
--- a/compiler/src/test/golden/TestService.java.txt
+++ b/compiler/src/test/golden/TestService.java.txt
@@ -243,6 +243,7 @@
this.methodId = methodId;
}
+ @java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
@@ -259,6 +260,7 @@
}
}
+ @java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver<Req> invoke(
io.grpc.stub.StreamObserver<Resp> responseObserver) {
diff --git a/compiler/src/test/golden/TestServiceNano.java.txt b/compiler/src/test/golden/TestServiceNano.java.txt
index b310d92..5c37877 100644
--- a/compiler/src/test/golden/TestServiceNano.java.txt
+++ b/compiler/src/test/golden/TestServiceNano.java.txt
@@ -321,6 +321,7 @@
this.methodId = methodId;
}
+ @java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
@@ -337,6 +338,7 @@
}
}
+ @java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver<Req> invoke(
io.grpc.stub.StreamObserver<Resp> responseObserver) {