Claus Ibsen created CAMEL-27814:
-----------------------------------
Summary: 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
Fix For: 4.25.0
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_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)