[
https://issues.apache.org/jira/browse/CAMEL-26199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-26199.
---------------------------------
Resolution: Fixed
Fixed by https://github.com/apache/camel/pull/29022 (merged to main as
8f7cfa4b5423cbf035d33933fba67f3e7f747b7f).
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> 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
> Assignee: Claus Ibsen
> Priority: Minor
> 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)