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

Simple bean call doesn't like parenthesis in parameter values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.13.0
    • 2.15.1, 2.16.0
    • camel-core
    • None
    • Unknown

    Description

      The simple language fails calling methods with parameters that contains ")".

      First use case, direct use:

      <route>
          <from uri="timer:foo?repeatCount=1"/>
          <setBody>
              <groovy>[")", 42]</groovy>
          </setBody>
          <setHeader headerName="test">
              <simple>${body.contains(")")}</simple>
          </setHeader>
          <log message="Body: ${body}, contains: ${header.test}"/>
      </route>
      

      It throws an error.

      Second use case, with a usage of a parameter:

      <route>
          <from uri="timer:foo?repeatCount=1"/>
          <setBody>
              <groovy>[")", 42]</groovy>
          </setBody>
          <setProperty propertyName="query">
              <constant>)</constant>
          </setProperty>
          <setHeader headerName="test">
              <simple>${body.contains(${property.query})}</simple>
          </setHeader>
          <log message="Body: ${body}, contains: ${header.test}"/>
      </route>
      

      It doesn't throw any exception but doesn't work.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: