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 2021/02/11 06:33:46 UTC

[camel] 02/02: CAMEL-16079 - aws-sns2 does not recognise FIFO queue configured though arn

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

acosentino pushed a commit to branch 16079-3.7.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 837768043b1b1f29acc9692795efc1a2845ec2d8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 11 06:59:38 2021 +0100

    CAMEL-16079 - aws-sns2 does not recognise FIFO queue configured though arn
---
 .../org/apache/camel/component/aws2/sns/Sns2Configuration.java     | 2 +-
 .../camel/component/aws2/sns/SnsComponentConfigurationTest.java    | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java
index fb957d1..c0799e3 100644
--- a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java
+++ b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java
@@ -351,7 +351,7 @@ public class Sns2Configuration implements Cloneable {
     boolean isFifoTopic() {
         // AWS docs suggest this is valid derivation.
         // FIFO topic names must end with .fifo, and standard topic cannot
-    	if (ObjectHelper.isNotEmpty(topicName)) {
+        if (ObjectHelper.isNotEmpty(topicName)) {
             if (topicName.endsWith(".fifo")) {
                 return true;
             }
diff --git a/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SnsComponentConfigurationTest.java b/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SnsComponentConfigurationTest.java
index 399467e..5b980b8 100644
--- a/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SnsComponentConfigurationTest.java
+++ b/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SnsComponentConfigurationTest.java
@@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test;
 import software.amazon.awssdk.core.Protocol;
 import software.amazon.awssdk.regions.Region;
 
-import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -228,7 +228,7 @@ public class SnsComponentConfigurationTest extends CamelTestSupport {
         Sns2Component component = context.getComponent("aws2-sns", Sns2Component.class);
         component.createEndpoint("aws2-sns://MyTopic?amazonSNSClient=#amazonSNSClient");
     }
-    
+
     @Test
     public void createEndpointWithArnConfiguration() throws Exception {
         AmazonSNSClientMock mock = new AmazonSNSClientMock();
@@ -237,7 +237,8 @@ public class SnsComponentConfigurationTest extends CamelTestSupport {
 
         Sns2Component component = context.getComponent("aws2-sns", Sns2Component.class);
         Sns2Endpoint endpoint = (Sns2Endpoint) component
-                .createEndpoint("aws2-sns://arn:aws:sns:eu-west-1:123456789:somewhere-over-the-rainbow?amazonSNSClient=#amazonSNSClient&accessKey=xxx&secretKey=yyy");
+                .createEndpoint(
+                        "aws2-sns://arn:aws:sns:eu-west-1:123456789:somewhere-over-the-rainbow?amazonSNSClient=#amazonSNSClient&accessKey=xxx&secretKey=yyy");
 
         assertEquals("arn:aws:sns:eu-west-1:123456789:somewhere-over-the-rainbow", endpoint.getConfiguration().getTopicArn());
         assertEquals("xxx", endpoint.getConfiguration().getAccessKey());