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 2018/01/23 14:39:05 UTC

[camel] 01/04: Camel-AWS DDBStream - check if client or accessKey/secretKey are defined before istantiate endpoint

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 fcd88c3bce2d54762cfe1604397a71e268a4c97c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jan 23 15:29:21 2018 +0100

    Camel-AWS DDBStream - check if client or accessKey/secretKey are defined before istantiate endpoint
---
 .../org/apache/camel/component/aws/ddbstream/DdbStreamComponent.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamComponent.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamComponent.java
index 46d4a44..a9586a1 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamComponent.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamComponent.java
@@ -66,7 +66,9 @@ public class DdbStreamComponent extends DefaultComponent {
         if (ObjectHelper.isEmpty(configuration.getRegion())) {
             setRegion(region);
         }
-        
+        if (configuration.getAmazonDynamoDbStreamsClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
+            throw new IllegalArgumentException("amazonDDBStreamsClient or accessKey and secretKey must be specified");
+        }
         DdbStreamEndpoint endpoint = new DdbStreamEndpoint(uri, configuration, this);
         setProperties(endpoint, parameters);
         return endpoint;

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.