Michal Stepan created CAMEL-16152:
-------------------------------------
Summary: 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
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)