Claus Ibsen created CAMEL-26193:
-----------------------------------

             Summary: camel-lpr - a Map, POJO, number or null body gives a 
print job with null data and no error
                 Key: CAMEL-26193
                 URL: https://issues.apache.org/jira/browse/CAMEL-26193
             Project: Camel
          Issue Type: Bug
          Components: camel-printer
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of lpr (CAMEL-24961, PR #28414).

h4. 1. A body that does not convert to InputStream is printed as null data

{{PrinterProducer.process}} (main 2a465aa4814c, line 55 to 56) converts the 
body with the non-mandatory {{convertTo(InputStream.class, body)}}. For a Map, 
a POJO, a number or a null body the stream is null and the producer submits a 
print job with null data; Camel raises no error. Checked on 4.24.0-SNAPSHOT 
with a mocked PrintService.

Proposed: use a mandatory conversion so an unsupported body fails the exchange.

_Claude Code on behalf of davsclaus_



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

Reply via email to