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

[camel] 02/02: (chores) avoid shadowing variables

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

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

commit ca834e2ea84664176cf64a66574a51d47d3ce1fc
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Oct 13 11:12:50 2022 +0200

    (chores) avoid shadowing variables
    
    Components:
    - camel-kafka
---
 .../java/org/apache/camel/component/kafka/KafkaConfiguration.java   | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
index 467d3e12480..ba2a1feea77 100755
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
@@ -394,7 +394,6 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware
             applyProducerSslConfiguration(props);
         }
 
-        final String securityProtocol = getSecurityProtocol();
         addPropertyIfNotEmpty(props, CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol);
 
         // SASL
@@ -421,8 +420,6 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware
     }
 
     private void applyProducerSslConfiguration(Properties props) {
-        final String securityProtocol = getSecurityProtocol();
-
         if (securityProtocol.equals(SecurityProtocol.SSL.name()) || securityProtocol.equals(SecurityProtocol.SASL_SSL.name())) {
             addPropertyIfNotEmpty(props, CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, getSecurityProtocol());
             addPropertyIfNotEmpty(props, SslConfigs.SSL_KEY_PASSWORD_CONFIG, getSslKeyPassword());
@@ -486,7 +483,6 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware
         }
 
         // Security protocol
-        final String securityProtocol = getSecurityProtocol();
         addPropertyIfNotEmpty(props, CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol);
 
         // SASL
@@ -506,8 +502,6 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware
     }
 
     private void applySslConsumerConfigurationFromOptions(Properties props) {
-        final String securityProtocol = getSecurityProtocol();
-
         if (securityProtocol.equals(SecurityProtocol.SSL.name()) || securityProtocol.equals(SecurityProtocol.SASL_SSL.name())) {
             addPropertyIfNotEmpty(props, SslConfigs.SSL_KEY_PASSWORD_CONFIG, getSslKeyPassword());
             addPropertyIfNotEmpty(props, SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG, getSslKeystoreLocation());