[
https://issues.apache.org/jira/browse/CAMEL-20534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Netherton resolved CAMEL-20534.
-------------------------------------
Resolution: Fixed
> camel-grpc: Port validation should check if a port was specified
> ----------------------------------------------------------------
>
> Key: CAMEL-20534
> URL: https://issues.apache.org/jira/browse/CAMEL-20534
> Project: Camel
> Issue Type: Improvement
> Components: camel-grpc
> Reporter: James Netherton
> Assignee: James Netherton
> Priority: Minor
> Fix For: 4.4.1, 4.5.0
>
>
> The gRPC docs are maybe a bit misleading because they state that the port
> part of the URI is mandatory.
> However, it's currently possible to omit it and you then end up with either a
> consumer started on a random port (because the port int has the default value
> of 0). Or a producer that tries to connect to the gRPC default port.
> So I propose to initialize the port with a default of -1 and fix up the
> validation logic as using isEmpty is not really appropriate in this case.
> [https://github.com/apache/camel/blob/7c8e7414e31f3eab888c7fb539abc8e5b3a61d6b/components/camel-grpc/src/main/java/org/apache/camel/component/grpc/GrpcConsumer.java#L96]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)