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 2019/05/15 14:41:34 UTC

[camel] 03/04: CAMEL-13519 - Fixed CS

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

commit 7e28638ad2b1aa53f9960e88aee52906f320ab6e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed May 15 16:11:10 2019 +0200

    CAMEL-13519 - Fixed CS
---
 .../org/apache/camel/component/aws/sns/SnsEndpoint.java  | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
index 1d960d6..de12b51 100644
--- a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
+++ b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
@@ -16,6 +16,9 @@
  */
 package org.apache.camel.component.aws.sns;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import com.amazonaws.AmazonServiceException;
 import com.amazonaws.ClientConfiguration;
 import com.amazonaws.auth.AWSCredentials;
@@ -32,9 +35,6 @@ import com.amazonaws.services.sns.model.SetTopicAttributesRequest;
 import com.amazonaws.services.sns.model.Topic;
 import com.amazonaws.services.sns.util.Topics;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.camel.Component;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
@@ -126,11 +126,11 @@ public class SnsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
             CreateTopicRequest request = new CreateTopicRequest(configuration.getTopicName());
             
             if (configuration.isServerSideEncryptionEnabled()) {
-            	if (ObjectHelper.isNotEmpty(configuration.getKmsMasterKeyId())) {
-            	    Map<String, String> attributes = new HashMap<>();
-            	    attributes.put("KmsMasterKeyId", configuration.getKmsMasterKeyId());
-            	    request.setAttributes(attributes);
-            	}
+                if (ObjectHelper.isNotEmpty(configuration.getKmsMasterKeyId())) {
+                    Map<String, String> attributes = new HashMap<>();
+                    attributes.put("KmsMasterKeyId", configuration.getKmsMasterKeyId());
+                    request.setAttributes(attributes);
+                }
             }
 
             log.trace("Creating topic [{}] with request [{}]...", configuration.getTopicName(), request);