You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/02/07 12:48:00 UTC
[jira] [Resolved] (CAMEL-16152) XML DSL tokenize with token in
simple language and group does not set the delimiter correctly
[ https://issues.apache.org/jira/browse/CAMEL-16152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-16152.
---------------------------------
Fix Version/s: 3.4.6
Resolution: Fixed
> XML DSL tokenize with token in simple language and group does not set the delimiter correctly
> ---------------------------------------------------------------------------------------------
>
> Key: CAMEL-16152
> URL: https://issues.apache.org/jira/browse/CAMEL-16152
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 3.5.0
> Reporter: Michal Stepan
> Assignee: Claus Ibsen
> Priority: Minor
> Labels: camel, language, simple, tokenizer
> Fix For: 3.4.6, 3.7.3, 3.8.0
>
>
> We discovered a problem within <tokenize> component in <split>.
> We have tokenize with:
> * token is simple expression
> * group
>
> When the route gots executed, following wrong behaviour occur:
> * the simple expression is not evaluated
> All can be seen in example route:
> {code:java}
> <route id="test-foo-route">
> <from uri="timer://foo?repeatCount=1"/>
> <setHeader name="test">
> <constant>B</constant>
> </setHeader>
> <setBody>
> <constant>aaBaaBaaB</constant>
> </setBody>
> <split>
> <tokenize token="${headers.test}" group="2"/>
> <log message="Body in tokenize ${body}"/>
> </split>
> </route>
> {code}
> Log:
> {code:java}
> 14:03:29.943 | INFO | Camel (camel-1) thread #1 - timer://foo | test-foo-route | ID-michal-desktop-1612530209931-0-2 | test-foo-route | Body in tokenize aa${headers.test}aa
> 14:03:29.943 | INFO | Camel (camel-1) thread #1 - timer://foo | test-foo-route | ID-michal-desktop-1612530209931-0-3 | test-foo-route | Body in tokenize aa
> {code}
> The correct behaviour would be that the body will contain evaluated simple expression given in *token*.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)