Claus Ibsen created CAMEL-26098:
-----------------------------------

             Summary: camel-aws2-ecs - no operation fails with a 
NullPointerException
                 Key: CAMEL-26098
                 URL: https://issues.apache.org/jira/browse/CAMEL-26098
             Project: Camel
          Issue Type: Bug
          Components: camel-aws2
    Affects Versions: 4.18.0, 4.22.0, 4.23.0
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of aws2-ecs (CAMEL-24961).

h4. 1. No operation fails with a NullPointerException

The operation option has no default, and with no CamelAwsECSOperation header, 
{{switch (determineOperation(exchange))}} ({{ECS2Producer}}, main ed3d719b379c, 
line 64) fails with {{NullPointerException: Cannot invoke "...ordinal()" 
because the return value of "...determineOperation(...)" is null}}. Checked on 
4.24.0-SNAPSHOT with {{camel run}} against the AWS emulator of {{camel infra 
run aws}}.

*Proposed change*: fail with a message that says to set the operation option or 
header, as aws2-kms does ("Operation must be specified").

h4. Also read in the code, not run

* With pojoRequest, an empty body is reported as "Expected body of type ... but 
was null" (line 232), as {{ObjectHelper.isNotEmpty}} is false for an empty 
String, List or Map.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to