You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/01/21 08:47:01 UTC

[2/3] camel git commit: CAMEL-9210 - csfix -> accessKey and secretKey options for CloudWatch is now optional

CAMEL-9210 - csfix -> accessKey and secretKey options for CloudWatch is now optional

csfix -> accessKey and secretKey options for CloudWatch is now optional
and AWS Java SDK handles those keys unless they are not provided in URI.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/17c50400
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/17c50400
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/17c50400

Branch: refs/heads/master
Commit: 17c50400a11bde6326236d3d15916fe7591b0194
Parents: 901b6a4
Author: onders86 <on...@gmail.com>
Authored: Sat Jan 21 02:16:06 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jan 21 09:02:15 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/component/aws/cw/CwEndpoint.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/17c50400/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
index 8d102cc..cd86d81 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
@@ -98,12 +98,12 @@ public class CwEndpoint extends DefaultEndpoint {
         ClientConfiguration clientConfiguration = null;
         boolean isClientConfigFound = false;
         if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
-        	clientConfiguration = new ClientConfiguration();
+            clientConfiguration = new ClientConfiguration();
             clientConfiguration.setProxyHost(configuration.getProxyHost());
             clientConfiguration.setProxyPort(configuration.getProxyPort());
             isClientConfigFound = true;
         }
-        if( (configuration.getAccessKey() != null && configuration.getSecretKey() != null) ) {
+        if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {
             AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
             if (isClientConfigFound) {
                 client = new AmazonCloudWatchClient(credentials, clientConfiguration);
@@ -111,8 +111,8 @@ public class CwEndpoint extends DefaultEndpoint {
                 client = new AmazonCloudWatchClient(credentials);
             }
         } else {
-        	if (isClientConfigFound) {
-        		client = new AmazonCloudWatchClient();
+            if (isClientConfigFound) {
+                client = new AmazonCloudWatchClient();
             } else {
                 client = new AmazonCloudWatchClient(clientConfiguration);
             }