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 d2926c7a297c2d0d2fdcb7baf77242f54aca7a08 Author: Andrea Cosentino <[email protected]> AuthorDate: Tue Jan 30 09:23:31 2018 +0100 Camel-AWS SNS - Use Regions.valueOf in the verifier --- .../apache/camel/component/aws/sns/SnsComponentVerifierExtension.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsComponentVerifierExtension.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsComponentVerifierExtension.java index 27ccb3b..759bea8 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsComponentVerifierExtension.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsComponentVerifierExtension.java @@ -23,6 +23,7 @@ import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.regions.Regions; import com.amazonaws.services.sns.AmazonSNS; import com.amazonaws.services.sns.AmazonSNSClientBuilder; @@ -70,7 +71,7 @@ public class SnsComponentVerifierExtension extends DefaultComponentVerifierExten SnsConfiguration configuration = setProperties(new SnsConfiguration(), parameters); AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey()); AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials); - AmazonSNS client = AmazonSNSClientBuilder.standard().withCredentials(credentialsProvider).withRegion(configuration.getRegion()).build(); + AmazonSNS client = AmazonSNSClientBuilder.standard().withCredentials(credentialsProvider).withRegion(Regions.valueOf(configuration.getRegion())).build(); client.listSubscriptions(); } catch (SdkClientException e) { ResultErrorBuilder errorBuilder = ResultErrorBuilder.withCodeAndDescription(VerificationError.StandardCode.AUTHENTICATION, e.getMessage()) -- To stop receiving notification emails like this one, please contact [email protected].
