Claus Ibsen created CAMEL-26127:
-----------------------------------

             Summary: camel-fop - a null, Map or DOM Document body fails with a 
NullPointerException
                 Key: CAMEL-26127
                 URL: https://issues.apache.org/jira/browse/CAMEL-26127
             Project: Camel
          Issue Type: Bug
          Components: camel-fop
            Reporter: Claus Ibsen
             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, Map or DOM Document body fails with a NullPointerException

{{FopProducer.process}} (main 2a465aa4814c, line 64) reads the body with 
{{getBody(StreamSource.class)}}, which is null for a null body, a Map or a DOM 
{{Document}}; the transform then fails with a NullPointerException 
({{Source.getSystemId()}}) instead of a clear error, and a DOM Document, a 
valid XSL-FO input, is not accepted. Checked on 4.24.0-SNAPSHOT in-process.

Proposed: use {{getMandatoryBody}}, and accept a DOM node (or any {{Source}}) 
as well as a StreamSource.

_Claude Code on behalf of davsclaus_



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

Reply via email to