You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/10/26 15:59:37 UTC

[camel] 01/02: (chores) camel-aws2-athena: avoid shadowing member variables

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 9c1a13517a54a0955e431cbcd6dcf964e549a21b
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Oct 26 16:37:36 2022 +0200

    (chores) camel-aws2-athena: avoid shadowing member variables
---
 .../apache/camel/component/aws2/athena/Athena2Component.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Component.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Component.java
index f2ebe27a207..661033ba2aa 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Component.java
+++ b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Component.java
@@ -47,13 +47,13 @@ public class Athena2Component extends DefaultComponent {
 
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-        Athena2Configuration configuration
+        Athena2Configuration configurationClone
                 = this.configuration != null ? this.configuration.copy() : new Athena2Configuration();
-        Athena2Endpoint endpoint = new Athena2Endpoint(uri, this, configuration);
+        Athena2Endpoint endpoint = new Athena2Endpoint(uri, this, configurationClone);
         setProperties(endpoint, parameters);
-        if (!configuration.isUseDefaultCredentialsProvider() && configuration.getAmazonAthenaClient() == null
-                && (configuration.getAccessKey() == null
-                        || configuration.getSecretKey() == null)) {
+        if (!configurationClone.isUseDefaultCredentialsProvider() && configurationClone.getAmazonAthenaClient() == null
+                && (configurationClone.getAccessKey() == null
+                        || configurationClone.getSecretKey() == null)) {
             throw new IllegalArgumentException(
                     "useDefaultCredentialsProvider is set to false, accessKey/secretKey or amazonAthenaClient must be specified");
         }