Claus Ibsen created CAMEL-26199:
-----------------------------------
Summary: camel-spring-ldap - a body that is not a Map, or no body,
fails with a bare NullPointerException
Key: CAMEL-26199
URL: https://issues.apache.org/jira/browse/CAMEL-26199
Project: Camel
Issue Type: Bug
Components: camel-spring
Reporter: Claus Ibsen
Fix For: 4.24.0
Found while adding the catalog body types of spring-ldap (CAMEL-24961, PR
#28416).
h4. 1. A non-Map body or no body fails with a bare NPE
{{SpringLdapProducer.process}} (main 2a465aa4814c, line 86) reads the body with
the non-mandatory {{getBody(Map.class)}} and calls {{body.get(DN)}} at line 95;
for a String body or no body the exchange fails with a NullPointerException
("body" is null) that does not say a Map is expected. Checked on
4.24.0-SNAPSHOT with a local OpenLDAP container.
Proposed: use {{getMandatoryBody(Map.class)}} so the error names the expected
body type.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)