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

Claus Ibsen updated CAMEL-27814:
--------------------------------
    Description: 
Found while improving the option descriptions of camel-graphql for CAMEL-23832 
(commit 
https://github.com/apache/camel/commit/76b15186608df88e4e2421561d9386dd56102b49,
 pull request https://github.com/apache/camel/pull/31139).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. A missing queryFile gives a NullPointerException per exchange
{{GraphqlEndpoint.getQuery}} loads queryFile lazily on the first exchange; a 
classpath resource that does not exist gives a null stream and a 
NullPointerException on each exchange, not a clear error at startup.
Proposed change: load and check the file when the endpoint starts.

h4. 2. proxyHost without a port fails with ArrayIndexOutOfBoundsException
{{AuthClientConfigurer.configureHttpClient}} splits proxyHost on ":" and reads 
parts[1], so "proxy" without a port fails at producer start, and an IPv6 
address is split wrongly.
Proposed change: parse with HttpHost.create, and use a default port.


_Claude Code on behalf of davsclaus_

  was:
Found while improving the option descriptions of camel-graphql for CAMEL-23832 
(pull request https://github.com/apache/camel/pull/31139).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. A missing queryFile gives a NullPointerException per exchange
{{GraphqlEndpoint.getQuery}} loads queryFile lazily on the first exchange; a 
classpath resource that does not exist gives a null stream and a 
NullPointerException on each exchange, not a clear error at startup.
Proposed change: load and check the file when the endpoint starts.

h4. 2. proxyHost without a port fails with ArrayIndexOutOfBoundsException
{{AuthClientConfigurer.configureHttpClient}} splits proxyHost on ":" and reads 
parts[1], so "proxy" without a port fails at producer start, and an IPv6 
address is split wrongly.
Proposed change: parse with HttpHost.create, and use a default port.


_Claude Code on behalf of davsclaus_


> camel-graphql: a missing queryFile fails on every exchange with 
> NullPointerException, a proxyHost without a port fails at start
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27814
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27814
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-graphql
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-graphql for 
> CAMEL-23832 (commit 
> https://github.com/apache/camel/commit/76b15186608df88e4e2421561d9386dd56102b49,
>  pull request https://github.com/apache/camel/pull/31139).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. A missing queryFile gives a NullPointerException per exchange
> {{GraphqlEndpoint.getQuery}} loads queryFile lazily on the first exchange; a 
> classpath resource that does not exist gives a null stream and a 
> NullPointerException on each exchange, not a clear error at startup.
> Proposed change: load and check the file when the endpoint starts.
> h4. 2. proxyHost without a port fails with ArrayIndexOutOfBoundsException
> {{AuthClientConfigurer.configureHttpClient}} splits proxyHost on ":" and 
> reads parts[1], so "proxy" without a port fails at producer start, and an 
> IPv6 address is split wrongly.
> Proposed change: parse with HttpHost.create, and use a default port.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to