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 249158d065437349d71a58283bf475b426c2a817 Author: Andrea Cosentino <anco...@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 d1c93be..21f19c0 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 @@ -352,7 +352,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 865b015..74efa61 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());