gnodet-bot commented on code in PR #29300:
URL: https://github.com/apache/camel/pull/29300#discussion_r4510946804
##########
components/camel-grpc/src/main/java/org/apache/camel/component/grpc/server/GrpcRequestAbstractStreamObserver.java:
##########
@@ -40,4 +42,45 @@ protected GrpcRequestAbstractStreamObserver(GrpcEndpoint
endpoint, GrpcConsumer
this.responseObserver = responseObserver;
this.headers = headers;
}
+
+ /**
+ * The response message type of the method: a reply of another type is
converted to it, or ends the call with an
+ * error.
+ */
+ public Class<?> getResponseType() {
+ return responseType;
+ }
+
+ public void setResponseType(Class<?> responseType) {
+ this.responseType = responseType;
+ }
+
+ /**
+ * Sends the reply of the exchange to the client, converted to the
response type of the method.
+ *
+ * @return true if the reply was sent, false if it is not of the response
type and the call ended with an error
Review Comment:
🟡 **Javadoc mismatch:** The `@return` claims `false` when the reply is not
of the response type, but this backport does no type conversion —
`sendResponses()` unconditionally returns `true`. The description was copied
from `main` where `GrpcMethodHandler.sendResponses()` performs type conversion;
that logic was not included in this backport.
```suggestion
* @return always true (type conversion is not performed in this
backport)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]