Claus Ibsen created CAMEL-27973:
-----------------------------------

             Summary: camel-google-drive: unknown proxy host only logged, later 
calls fail with NullPointerException
                 Key: CAMEL-27973
                 URL: https://issues.apache.org/jira/browse/CAMEL-27973
             Project: Camel
          Issue Type: Bug
          Components: camel-google-drive
            Reporter: Claus Ibsen
             Fix For: 4.25.0


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

h4. 1. An unknown proxy host fails later with a NullPointerException
{{BatchGoogleDriveClientFactory(String proxyHost, int proxyPort)}} only logs an 
UnknownHostException from InetAddress.getByName ("Unknow proxy host") and keeps 
transport and jsonFactory null. Every makeClient call then fails in 
Drive.Builder (checkNotNull(transport)), wrapped as "Could not create Google 
Drive client.", and the cause only shows in an earlier log line.
Proposed change: throw an IllegalArgumentException naming the proxy host from 
the constructor, or use InetSocketAddress.createUnresolved so the proxy 
resolves the name.

h4. 2. Smaller issues
drive-about is missing from the apis section of google-drive.json because its 
configuration class has no fields, so drive-about/get is not in the catalog. 
clientFactory is "advanced" on the component but has no label on the endpoint. 
The apiName enum lists the Java constants (DRIVE_ABOUT, DRIVE_FILES) while URIs 
use drive-about, drive-files. The scopes are split on "," without trimming.


_Claude Code on behalf of davsclaus_



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

Reply via email to