You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Onlinee (Jira)" <ji...@apache.org> on 2021/07/02 12:43:00 UTC

[jira] [Commented] (CAMEL-16775) camel-core - simple("${body} starts with /startsWith 'xyz'") fails

    [ https://issues.apache.org/jira/browse/CAMEL-16775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17373492#comment-17373492 ] 

Onlinee commented on CAMEL-16775:
---------------------------------

That is what i expect when i read "startsWith/starts with : _For testing if the left hand side string starts with the right hand string"_ in the simple language documentation_._

> camel-core - simple("${body} starts with /startsWith 'xyz'") fails
> ------------------------------------------------------------------
>
>                 Key: CAMEL-16775
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16775
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 3.6.0
>            Reporter: Onlinee
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.12.0
>
>         Attachments: StartsWithTest.java
>
>
> Hello,
> since Camel Version 3.6 [simple language operator|[https://camel.apache.org/components/latest/languages/simple-language.html#_operator_support]] "starts with" / "startsWith" is buggy.
> This works with camel 3.5
>  * .when(simple("${body} starts with '010'"))
>  * .when(simple("${body} startsWith '010'"))
>  * .when(bodyAs(String.class).startsWith("010")) 
> This works with camel 3.6 only
>  * .when(bodyAs(String.class).startsWith("010")) 
> See also TestCase [^StartsWithTest.java].
> Regards.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)