camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] 03/04: Camel-AWS Kinesis - check if client or accessKey/secretKey are defined before istantiate endpoint
Date Tue, 23 Jan 2018 14:39:07 GMT
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 50241cfbfb87c4734973bdec417e09ad48d821cc
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Tue Jan 23 15:35:11 2018 +0100

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

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisComponent.java
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisComponent.java
index 6eec875..a5d8c1c 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisComponent.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisComponent.java
@@ -60,7 +60,9 @@ public class KinesisComponent extends DefaultComponent {
         if (ObjectHelper.isEmpty(configuration.getRegion())) {
             setRegion(region);
         }
-        
+        if (configuration.getAmazonKinesisClient() == null && (configuration.getAccessKey()
== null || configuration.getSecretKey() == null)) {
+            throw new IllegalArgumentException("amazonKinesisClient or accessKey and secretKey
must be specified");
+        }        
         KinesisEndpoint endpoint = new KinesisEndpoint(uri, configuration, this);
         setProperties(endpoint, parameters);
         return endpoint;

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

Mime
View raw message