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 2016/07/05 11:22:28 UTC
[3/4] camel git commit: Fixed CS
Fixed CS
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5086efed
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5086efed
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5086efed
Branch: refs/heads/master
Commit: 5086efed065a922954c1283bab9a68ac69a4a51f
Parents: b059605
Author: Andrea Cosentino <an...@gmail.com>
Authored: Tue Jul 5 12:35:29 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Jul 5 12:46:50 2016 +0200
----------------------------------------------------------------------
.../camel/component/aws/s3/S3Configuration.java | 13 ++++++-------
.../camel/component/aws/s3/S3Producer.java | 20 ++++++++++----------
.../aws/s3/S3ComponentCopyObjectSpringTest.java | 6 +++---
.../aws/s3/S3ComponentCopyObjectTest.java | 6 +++---
4 files changed, 22 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/5086efed/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
index 533bcc8..4939832 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
@@ -284,18 +284,17 @@ public class S3Configuration implements Cloneable {
}
public S3Operations getOperation() {
- return operation;
- }
+ return operation;
+ }
/**
* *Camel 2.18*: The operation to do in case the user don't want to do only an upload
*/
- public void setOperation(S3Operations operation) {
- this.operation = operation;
- }
+ public void setOperation(S3Operations operation) {
+ this.operation = operation;
+ }
- boolean hasProxyConfiguration() {
+ boolean hasProxyConfiguration() {
return ObjectHelper.isNotEmpty(getProxyHost()) && ObjectHelper.isNotEmpty(getProxyPort());
-
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/5086efed/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
index 538d413..e7bab7e 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
@@ -74,14 +74,14 @@ public class S3Producer extends DefaultProducer {
@Override
public void process(final Exchange exchange) throws Exception {
- S3Operations operation = determineOperation(exchange);
- if (ObjectHelper.isEmpty(operation)) {
+ S3Operations operation = determineOperation(exchange);
+ if (ObjectHelper.isEmpty(operation)) {
if (getConfiguration().isMultiPartUpload()) {
processMultiPart(exchange);
} else {
processSingleOp(exchange);
}
- } else {
+ } else {
switch (operation) {
case copyObject:
copyObject(getEndpoint().getS3Client(), exchange);
@@ -89,7 +89,7 @@ public class S3Producer extends DefaultProducer {
default:
throw new IllegalArgumentException("Unsupported operation");
}
- }
+ }
}
public void processMultiPart(final Exchange exchange) throws Exception {
@@ -251,7 +251,7 @@ public class S3Producer extends DefaultProducer {
bucketName = exchange.getIn().getHeader(S3Constants.BUCKET_NAME, String.class);
if (ObjectHelper.isEmpty(bucketName)) {
- bucketName = getConfiguration().getBucketName();
+ bucketName = getConfiguration().getBucketName();
}
sourceKey = exchange.getIn().getHeader(S3Constants.KEY, String.class);
destinationKey = exchange.getIn().getHeader(S3Constants.DESTINATION_KEY, String.class);
@@ -259,22 +259,22 @@ public class S3Producer extends DefaultProducer {
versionId = exchange.getIn().getHeader(S3Constants.VERSION_ID, String.class);
if (ObjectHelper.isEmpty(bucketName)) {
- throw new IllegalArgumentException("Bucket Name must be specified for copyObject Operation");
+ throw new IllegalArgumentException("Bucket Name must be specified for copyObject Operation");
}
if (ObjectHelper.isEmpty(bucketNameDestination)) {
- throw new IllegalArgumentException("Bucket Name Destination must be specified for copyObject Operation");
+ throw new IllegalArgumentException("Bucket Name Destination must be specified for copyObject Operation");
}
if (ObjectHelper.isEmpty(sourceKey)) {
- throw new IllegalArgumentException("Source Key must be specified for copyObject Operation");
+ throw new IllegalArgumentException("Source Key must be specified for copyObject Operation");
}
if (ObjectHelper.isEmpty(destinationKey)) {
- throw new IllegalArgumentException("Destination Key must be specified for copyObject Operation");
+ throw new IllegalArgumentException("Destination Key must be specified for copyObject Operation");
}
CopyObjectRequest copyObjectRequest;
if (ObjectHelper.isEmpty(versionId)) {
copyObjectRequest = new CopyObjectRequest(bucketName, sourceKey, bucketNameDestination, destinationKey);
} else {
- copyObjectRequest = new CopyObjectRequest(bucketName, sourceKey, versionId, bucketNameDestination, destinationKey);
+ copyObjectRequest = new CopyObjectRequest(bucketName, sourceKey, versionId, bucketNameDestination, destinationKey);
}
CopyObjectResult copyObjectResult = s3Client.copyObject(copyObjectRequest);
http://git-wip-us.apache.org/repos/asf/camel/blob/5086efed/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectSpringTest.java b/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectSpringTest.java
index 5053932..35356a1 100644
--- a/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectSpringTest.java
+++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectSpringTest.java
@@ -43,9 +43,9 @@ public class S3ComponentCopyObjectSpringTest extends CamelSpringTestSupport {
template.send("direct:copyObject", ExchangePattern.InOnly, new Processor() {
public void process(Exchange exchange) throws Exception {
- exchange.getIn().setHeader(S3Constants.BUCKET_DESTINATION_NAME, "camelDestinationBucket");
- exchange.getIn().setHeader(S3Constants.KEY, "camelKey");
- exchange.getIn().setHeader(S3Constants.DESTINATION_KEY, "camelDestinationKey");
+ exchange.getIn().setHeader(S3Constants.BUCKET_DESTINATION_NAME, "camelDestinationBucket");
+ exchange.getIn().setHeader(S3Constants.KEY, "camelKey");
+ exchange.getIn().setHeader(S3Constants.DESTINATION_KEY, "camelDestinationKey");
}
});
http://git-wip-us.apache.org/repos/asf/camel/blob/5086efed/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectTest.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectTest.java b/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectTest.java
index 77cacd3..d10d918 100644
--- a/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectTest.java
+++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentCopyObjectTest.java
@@ -45,9 +45,9 @@ public class S3ComponentCopyObjectTest extends CamelTestSupport {
template.send("direct:start", ExchangePattern.InOnly, new Processor() {
public void process(Exchange exchange) throws Exception {
- exchange.getIn().setHeader(S3Constants.BUCKET_DESTINATION_NAME, "camelDestinationBucket");
- exchange.getIn().setHeader(S3Constants.KEY, "camelKey");
- exchange.getIn().setHeader(S3Constants.DESTINATION_KEY, "camelDestinationKey");
+ exchange.getIn().setHeader(S3Constants.BUCKET_DESTINATION_NAME, "camelDestinationBucket");
+ exchange.getIn().setHeader(S3Constants.KEY, "camelKey");
+ exchange.getIn().setHeader(S3Constants.DESTINATION_KEY, "camelDestinationKey");
}
});