git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to accomplish <simple trim="false"> with java?


You can turn off trim via

SimpleExpression se = new SimpleExpression("a ");
se.setTrim(false);

.setBody(se)



On Fri, Apr 13, 2018 at 9:48 AM, Hrvoje Djurdjevic
<hrvoje.djurdjevic@xxxxxxxxx> wrote:
> Hi,
>
> .setBody(simple("a "))
> .log("body length is ${body.length}")
>
> gives me this:
>
> body length is 1
>
> and I want 2 here, instead of 1, due to a trailing blank, context sensitive
> help within java editor doesn't give me a clue how to suppress trim.
> I'm using Apache Camel 2.20.1 , thanks in advance.
>
> Best regards



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03242.html on line 102
Call Stack
#TimeMemoryFunctionLocation
10.0007358376{main}( ).../msg03242.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03242.html on line 102
Call Stack
#TimeMemoryFunctionLocation
10.0007358376{main}( ).../msg03242.html:0