camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] 02/05: CAMEL-13591 - Fixed CS
Date Tue, 28 May 2019 11:26:10 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 f200caa64648e3878c4b3c4454716744b4257ff2
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Tue May 28 13:05:59 2019 +0200

    CAMEL-13591 - Fixed CS
---
 .../camel/component/aws/s3/S3Configuration.java    | 34 +++++++++++-----------
 .../apache/camel/component/aws/s3/S3Endpoint.java  | 13 ++++-----
 2 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
b/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
index 86f4382..91bc4a2 100644
--- a/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
+++ b/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
@@ -96,8 +96,8 @@ public class S3Configuration implements Cloneable {
     }
 
     /**
-     * Setup the partSize which is used in multi part upload,
-     * the default size is 25M.
+     * Setup the partSize which is used in multi part upload, the default size
+     * is 25M.
      */
     public void setPartSize(long partSize) {
         this.partSize = partSize;
@@ -108,8 +108,8 @@ public class S3Configuration implements Cloneable {
     }
 
     /**
-     * If it is true, camel will upload the file with multi part
-     * format, the part size is decided by the option of `partSize`
+     * If it is true, camel will upload the file with multi part format, the
+     * part size is decided by the option of `partSize`
      */
     public void setMultiPartUpload(boolean multiPartUpload) {
         this.multiPartUpload = multiPartUpload;
@@ -152,7 +152,7 @@ public class S3Configuration implements Cloneable {
     public String getPrefix() {
         return prefix;
     }
-    
+
     /**
      * The prefix which is used in the
      * com.amazonaws.services.s3.model.ListObjectsRequest to only consume
@@ -161,7 +161,7 @@ public class S3Configuration implements Cloneable {
     public void setPrefix(String prefix) {
         this.prefix = prefix;
     }
-    
+
     public String getDelimiter() {
         return delimiter;
     }
@@ -285,8 +285,8 @@ public class S3Configuration implements Cloneable {
     }
 
     /**
-     * Sets the server-side encryption algorithm when encrypting
-     * the object using AWS-managed keys. For example use <tt>AES256</tt>.
+     * Sets the server-side encryption algorithm when encrypting the object
+     * using AWS-managed keys. For example use <tt>AES256</tt>.
      */
     public void setServerSideEncryption(String serverSideEncryption) {
         this.serverSideEncryption = serverSideEncryption;
@@ -453,8 +453,8 @@ public class S3Configuration implements Cloneable {
     }
 
     /**
-     * Set whether the S3 client should expect to load credentials on an EC2 instance or
to
-     * expect static credentials to be passed in.
+     * Set whether the S3 client should expect to load credentials on an EC2
+     * instance or to expect static credentials to be passed in.
      */
     public void setUseIAMCredentials(Boolean useIAMCredentials) {
         this.useIAMCredentials = useIAMCredentials;
@@ -465,20 +465,20 @@ public class S3Configuration implements Cloneable {
     }
 
     public boolean isAutoCreateBucket() {
-		return autoCreateBucket;
-	}
+        return autoCreateBucket;
+    }
 
     /**
      * Setting the autocreation of the bucket
      */
-	public void setAutoCreateBucket(boolean autoCreateBucket) {
-		this.autoCreateBucket = autoCreateBucket;
-	}
+    public void setAutoCreateBucket(boolean autoCreateBucket) {
+        this.autoCreateBucket = autoCreateBucket;
+    }
 
-	public boolean hasProxyConfiguration() {
+    public boolean hasProxyConfiguration() {
         return ObjectHelper.isNotEmpty(getProxyHost()) && ObjectHelper.isNotEmpty(getProxyPort());
     }
-    
+
     // *************************************************
     //
     // *************************************************
diff --git a/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
b/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
index d11aae7..d1c5a7b 100644
--- a/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
+++ b/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
@@ -82,8 +82,7 @@ public class S3Endpoint extends ScheduledPollEndpoint {
     public void doStart() throws Exception {
         super.doStart();
 
-        s3Client = configuration.getAmazonS3Client() != null ? configuration.getAmazonS3Client()
-                : S3ClientFactory.getAWSS3Client(configuration, getMaxConnections()).getS3Client();
+        s3Client = configuration.getAmazonS3Client() != null ? configuration.getAmazonS3Client()
: S3ClientFactory.getAWSS3Client(configuration, getMaxConnections()).getS3Client();
 
         String fileName = getConfiguration().getFileName();
 
@@ -111,14 +110,14 @@ public class S3Endpoint extends ScheduledPollEndpoint {
         LOG.trace("Bucket [{}] doesn't exist yet", bucketName);
 
         if (getConfiguration().isAutoCreateBucket()) {
-        // creates the new bucket because it doesn't exist yet
-        CreateBucketRequest createBucketRequest = new CreateBucketRequest(getConfiguration().getBucketName());
+            // creates the new bucket because it doesn't exist yet
+            CreateBucketRequest createBucketRequest = new CreateBucketRequest(getConfiguration().getBucketName());
 
-        LOG.trace("Creating bucket [{}] in region [{}] with request [{}]...", configuration.getBucketName(),
configuration.getRegion(), createBucketRequest);
+            LOG.trace("Creating bucket [{}] in region [{}] with request [{}]...", configuration.getBucketName(),
configuration.getRegion(), createBucketRequest);
 
-        s3Client.createBucket(createBucketRequest);
+            s3Client.createBucket(createBucketRequest);
 
-        LOG.trace("Bucket created");
+            LOG.trace("Bucket created");
         }
 
         if (configuration.getPolicy() != null) {


Mime
View raw message