[ 
https://issues.apache.org/jira/browse/CAMEL-26129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-26129:
-----------------------------------

    Assignee: Claus Ibsen

> camel-dfdl - a null or Map body fails with a NullPointerException, and parse 
> errors log the message null
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26129
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26129
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-dfdl
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Found while adding the catalog body types of stax, fop, flatpack and dfdl 
> (CAMEL-24961, PR #28417).
> h4. 1. A null or Map body fails with a NullPointerException in both directions
> {{DfdlEndpoint.onExchange}} (main 2a465aa4814c, lines 99 and 109) reads the 
> body with {{getBody(Document.class)}} (unparse) and {{getBody(byte[].class)}} 
> (parse); for a null or Map body these return null and Daffodil fails with a 
> NullPointerException instead of a clear error. Checked on 4.24.0-SNAPSHOT 
> in-process.
> Proposed: use {{getMandatoryBody}}.
> h4. 2. DfdlParseException has no message
> The {{DfdlParseException}} constructor (main 2a465aa4814c, line 24) does not 
> pass a message to {{super}}, so {{getMessage()}} is null and a parse error is 
> logged as "null"; the diagnostics are only in {{getParseResult()}}. Checked 
> on 4.24.0-SNAPSHOT in-process.
> Proposed: build the message from the diagnostics of the ParseResult (and the 
> same for DfdlUnparseException).
> _Claude Code on behalf of davsclaus_



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

Reply via email to