You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Hrvoje Djurdjevic <hr...@gmail.com> on 2018/04/13 07:48:11 UTC
How to accomplish with java?
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
Re: How to accomplish with java?
Posted by Hrvoje Djurdjevic <hr...@gmail.com>.
Claus, thank you very much!
On Fri, Apr 13, 2018 at 9:58 AM, Claus Ibsen <cl...@gmail.com> wrote:
> 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
> <hr...@gmail.com> 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
>
Re: How to accomplish with java?
Posted by Claus Ibsen <cl...@gmail.com>.
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
<hr...@gmail.com> 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