You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/08/29 14:29:00 UTC

[jira] [Updated] (CAMEL-16893) Potential NPE in GrpcStreamingExchangeForwarder

     [ https://issues.apache.org/jira/browse/CAMEL-16893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-16893:
--------------------------------
    Fix Version/s: 3.11.2

> 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
>            Priority: Major
>             Fix For: 3.11.2, 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)