This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 2a6ffea Camel-AWS2-SQS: Check if useDefaultCredentialsProvider is
present or not
2a6ffea is described below
commit 2a6ffead20a125f18c51f7433a5b107a50d81286
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Apr 7 16:55:19 2021 +0200
Camel-AWS2-SQS: Check if useDefaultCredentialsProvider is present or not
---
.../main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
index 1aee562..9ccc689 100644
---
a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
+++
b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
@@ -68,7 +68,7 @@ public class Sqs2Component extends DefaultComponent {
}
Sqs2Endpoint sqsEndpoint = new Sqs2Endpoint(uri, this, configuration);
setProperties(sqsEndpoint, parameters);
- if (configuration.getAmazonSQSClient() == null
+ if (!configuration.isUseDefaultCredentialsProvider() &&
configuration.getAmazonSQSClient() == null
&& (configuration.getAccessKey() == null ||
configuration.getSecretKey() == null)) {
throw new IllegalArgumentException("AmazonSQSClient or accessKey
and secretKey must be specified.");
}