You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2026/08/21 17:43:00 UTC
[jira] [Updated] (CAMEL-24349) camel-google-functions: createFunction fails with an opaque NPE when required headers are missing
[ https://issues.apache.org/jira/browse/CAMEL-24349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Cosentino updated CAMEL-24349:
-------------------------------------
Fix Version/s: 4.22.0
> camel-google-functions: createFunction fails with an opaque NPE when required headers are missing
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24349
> URL: https://issues.apache.org/jira/browse/CAMEL-24349
> Project: Camel
> Issue Type: Bug
> Components: camel-google-functions
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Minor
> Fix For: 4.22.0
>
>
> {{createFunction}} passes header values straight into protobuf setters:
> {code:java}
> // GoogleCloudFunctionsProducer.java:185-193
> final String entryPoint = exchange.getIn().getHeader(GoogleCloudFunctionsConstants.ENTRY_POINT, String.class);
> final String runtime = exchange.getIn().getHeader(GoogleCloudFunctionsConstants.RUNTIME, String.class);
> final String sourceArchiveUrl = exchange.getIn().getHeader(GoogleCloudFunctionsConstants.SOURCE_ARCHIVE_URL, String.class);
> CloudFunction function = CloudFunction.newBuilder()
> .setName(...).setEntryPoint(entryPoint)
> .setRuntime(runtime).setHttpsTrigger(HttpsTrigger.getDefaultInstance())
> .setSourceArchiveUrl(sourceArchiveUrl).build();
> {code}
> Protobuf setters reject null, so a missing header produces a bare NPE instead of a message naming the header that is required.
> Also {{listFunctions}} (:96-101) sets {{setPageSize(Integer.MAX_VALUE)}} while already iterating with {{iterateAll()}}, which handles pagination itself - the explicit page size should be dropped or set to a value the API accepts.
> Found during a source audit of the {{components/camel-google}} module family against main @ c3b01310be15.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)