Calle Kabo created CAMEL-8797:
---------------------------------
Summary: byte array length is not correct in simple
Key: CAMEL-8797
URL: https://issues.apache.org/jira/browse/CAMEL-8797
Project: Camel
Issue Type: Bug
Reporter: Calle Kabo
I have a byte[] containing an XML.
{code}
<log message="Body is '${in.body.getClass.getCanonicalName}'"
loggingLevel="DEBUG"/>
<log message="Body = '${in.body}'" loggingLevel="DEBUG"/>
<choice>
<when>
<simple>${in.body} is
'java.io.File'</simple>
<setHeader
headerName="CamelAwsS3ContentLength">
<simple>${file:size}</simple>
</setHeader>
</when>
<otherwise>
<setHeader
headerName="CamelAwsS3ContentLength">
<simple>${in.body.length}</simple>
</setHeader>
</otherwise>
</choice>
<log message="Body length = ${in.header.CamelAwsS3ContentLength}"
loggingLevel="DEBUG"/>
{code}
The above code outputs the following in the logs:
{code}
Body is 'byte[]'
Body = '<?xml version="1.0" encoding="ISO-8859-1"?><root> /... bla bla bla .../
</root>'
Body length = 1
{code}
Using Camel 2.14.0.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)