Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6328

Simple expression and predicate have different behaviors when used along with properties

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.10.3
    • 2.10.5, 2.11.1, 2.12.0
    • camel-core
    • None
    • Unknown

    Description

      The following simple expression doesn't behave the same way whether it's used as expression or predicate:

      '{{foo}}' == 'bar'
      

      When used in an expression, it works perfectly.

      When used in a predicate the given expression is thrown:

      org.apache.camel.language.simple.types.SimpleIllegalSyntaxException: functionEnd has no matching start token at location 7
      '{{foo}}' == 'bar'
             *
      
      	at org.apache.camel.language.simple.SimplePredicateParser.parsePredicate(SimplePredicateParser.java:69)
      	at org.apache.camel.language.simple.SimpleLanguage.createPredicate(SimpleLanguage.java:136)
      	at org.apache.camel.builder.SimpleBuilder.matches(SimpleBuilder.java:73)
      	at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:66)
      ...
      

      You'll find attached the source code that shows the error

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            antoine.dessaigne Antoine DESSAIGNE
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment