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

Simple Language - Operators are not evaluated for setting body or headers

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.12.3, 2.13.0
    • Fix Version/s: 2.12.4, 2.13.1, 2.14.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Operators are not evaluated if using simple for setting bodies or headers:

      from("direct:simple")
          .setHeader("myHeader").simple("true == true", Boolean.class)
          .log("header = [${header.myHeader}]")
          .setBody(simple("true == true", Boolean.class))
          .log("body = [${body}]");
      

      Output is as follows:

      INFO  header = [false]
      INFO  body = [false]
      

      The outcome should be true in both cases.

      Also, see http://stackoverflow.com/questions/23523409/camel-how-to-set-boolean-header-parameter-using-simple-comparison/23560989#23560989

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                Peter Keller Peter Keller
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: