Andrea Cosentino created CAMEL-28051:
----------------------------------------

             Summary: camel-aws: setUseDefaultCredentialsProvider takes a boxed 
Boolean for a primitive field in 18 configurations
                 Key: CAMEL-28051
                 URL: https://issues.apache.org/jira/browse/CAMEL-28051
             Project: Camel
          Issue Type: Bug
          Components: camel-aws
            Reporter: Andrea Cosentino


Found during an audit of the cloud components (camel-aws, camel-azure, 
camel-google, camel-huawei) at commit 7c0644752e17. Every item below was 
verified against the source.

18 AWS configuration classes declare

{code:java}
private boolean useDefaultCredentialsProvider;
...
public void setUseDefaultCredentialsProvider(Boolean 
useDefaultCredentialsProvider) {
    this.useDefaultCredentialsProvider = useDefaultCredentialsProvider;
}
{code}

so a null - easy to produce from a properties binder, a Spring Boot 
configuration or a programmatic configurer - throws a NullPointerException on 
unboxing instead of being ignored. The other 20 AWS configurations take the 
primitive.

Affected: aws2-athena, aws2-comprehend, aws2-cw, aws2-ddb (Ddb2Configuration 
and Ddb2StreamConfiguration), aws2-eventbridge, aws2-lambda, aws2-polly, 
aws2-redshift, aws2-rekognition, aws2-s3, aws2-step-functions, aws2-timestream, 
aws2-translate, aws-bedrock (BedrockConfiguration, BedrockAgentConfiguration, 
BedrockAgentRuntimeConfiguration), aws-security-hub.

Proposed change: change the parameter to {{boolean}} in all 18, matching the 
majority and the field type.

_Claude Code on behalf of oscerd_



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

Reply via email to