This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 09bbb778b1761fbdfa66c1cb21150e0e7e3a2c7f
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Wed Oct 26 16:43:36 2022 +0200

    (chores) camel-aws2-sts: avoid shadowing member variables
---
 .../java/org/apache/camel/component/aws2/sts/STS2Component.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
 
b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
index 3e7acf88743..3c3c6a04de4 100644
--- 
a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
+++ 
b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
@@ -49,11 +49,11 @@ public class STS2Component extends DefaultComponent {
 
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
-        STS2Configuration configuration = this.configuration != null ? 
this.configuration.copy() : new STS2Configuration();
-        STS2Endpoint endpoint = new STS2Endpoint(uri, this, configuration);
+        STS2Configuration configurationClone = this.configuration != null ? 
this.configuration.copy() : new STS2Configuration();
+        STS2Endpoint endpoint = new STS2Endpoint(uri, this, 
configurationClone);
         setProperties(endpoint, parameters);
-        if (!configuration.isUseDefaultCredentialsProvider() && 
configuration.getStsClient() == null
-                && (configuration.getAccessKey() == null || 
configuration.getSecretKey() == null)) {
+        if (!configurationClone.isUseDefaultCredentialsProvider() && 
configurationClone.getStsClient() == null
+                && (configurationClone.getAccessKey() == null || 
configurationClone.getSecretKey() == null)) {
             throw new IllegalArgumentException(
                     "useDefaultCredentialsProvider is set to false, Amazon STS 
client or accessKey and secretKey must be specified");
         }

Reply via email to