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 2021/03/31 09:32:11 UTC
[camel] 04/09: Fixed CS
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 86ee6e805c11e89f84442aeef7d346b5bb1cb7af
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 31 11:13:01 2021 +0200
Fixed CS
---
.../component/aws2/lambda/Lambda2Producer.java | 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/components/camel-aws/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java b/components/camel-aws/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java
index d545aae..3005689 100644
--- a/components/camel-aws/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java
+++ b/components/camel-aws/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java
@@ -597,21 +597,21 @@ public class Lambda2Producer extends DefaultProducer {
private void listVersions(LambdaClient lambdaClient, Exchange exchange) throws InvalidPayloadException {
ListVersionsByFunctionRequest request = null;
ListVersionsByFunctionResponse result;
- if (getConfiguration().isPojoRequest()) {
+ if (getConfiguration().isPojoRequest()) {
request = exchange.getIn().getMandatoryBody(ListVersionsByFunctionRequest.class);
} else {
- ListVersionsByFunctionRequest.Builder builder = ListVersionsByFunctionRequest.builder();
- builder.functionName(getEndpoint().getFunction());
- request = builder.build();
+ ListVersionsByFunctionRequest.Builder builder = ListVersionsByFunctionRequest.builder();
+ builder.functionName(getEndpoint().getFunction());
+ request = builder.build();
}
- try {
- result = lambdaClient.listVersionsByFunction(request);
- } catch (AwsServiceException ase) {
- LOG.trace("publishVersion command returned the error code {}", ase.awsErrorDetails().errorCode());
- throw ase;
- }
- Message message = getMessageForResponse(exchange);
- message.setBody(result);
+ try {
+ result = lambdaClient.listVersionsByFunction(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("publishVersion command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
}
private void createAlias(LambdaClient lambdaClient, Exchange exchange) throws InvalidPayloadException {