You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "James Netherton (Jira)" <ji...@apache.org> on 2021/08/26 10:57:00 UTC
[jira] [Created] (CAMEL-16893) Potential NPE in
GrpcStreamingExchangeForwarder
James Netherton created CAMEL-16893:
---------------------------------------
Summary: Potential NPE in GrpcStreamingExchangeForwarder
Key: CAMEL-16893
URL: https://issues.apache.org/jira/browse/CAMEL-16893
Project: Camel
Issue Type: Bug
Components: camel-grpc
Reporter: James Netherton
Assignee: James Netherton
Fix For: 3.12.0
GrpcProducer.doStop() invokes shutdown() on the forwarder:
[https://github.com/apache/camel/blob/main/components/camel-grpc/src/main/java/org/apache/camel/component/grpc/GrpcProducer.java#L141]
If the GrpcStreamingExchangeForwarder has not receieved any any exchanges, then the streamObserver field will be null, and any refrence to it triggered in doCreateStream will result in a NullPointerException:
[https://github.com/apache/camel/blob/main/components/camel-grpc/src/main/java/org/apache/camel/component/grpc/client/GrpcStreamingExchangeForwarder.java#L92-L113]
If the streamObserver is null, then I don't see any need to run the logic in shutdown().
--
This message was sent by Atlassian Jira
(v8.3.4#803005)