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 2020/04/20 11:05:19 UTC
[camel] 05/24: CAMEL-14868 - Camel-AWS2-*: Where possible,
give the possiblity to the end user to pass an AWS Request pojo as
body, aws2-lambda fixed instanceof checks
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 6d6d6279c610decfae11fcbe8655af2db24d85df
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Apr 20 12:19:33 2020 +0200
CAMEL-14868 - Camel-AWS2-*: Where possible, give the possiblity to the end user to pass an AWS Request pojo as body, aws2-lambda fixed instanceof checks
---
.../java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java b/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java
index 5a532a7..9b6d2bb 100644
--- a/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java
+++ b/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Producer.java
@@ -181,7 +181,7 @@ public class Lambda2Producer extends DefaultProducer {
private void deleteFunction(LambdaClient lambdaClient, Exchange exchange) throws InvalidPayloadException {
if (getConfiguration().isPojoRequest()) {
Object payload = exchange.getIn().getMandatoryBody();
- if (payload instanceof GetFunctionRequest) {
+ if (payload instanceof DeleteFunctionRequest) {
DeleteFunctionResponse result;
try {
result = lambdaClient.deleteFunction((DeleteFunctionRequest) payload);
@@ -208,7 +208,7 @@ public class Lambda2Producer extends DefaultProducer {
private void listFunctions(LambdaClient lambdaClient, Exchange exchange) throws InvalidPayloadException {
if (getConfiguration().isPojoRequest()) {
Object payload = exchange.getIn().getMandatoryBody();
- if (payload instanceof GetFunctionRequest) {
+ if (payload instanceof ListFunctionsRequest) {
ListFunctionsResponse result;
try {
result = lambdaClient.listFunctions((ListFunctionsRequest) payload);