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

Simple Language - Additional after text after inbuilt function call is ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.12.3, 2.13.0
    • 2.12.4, 2.13.1, 2.14.0
    • None
    • None
    • Unknown

    Description

      The following Simple expression is valid and runs OK - however it may have been appropriate to report an error to the developer.

                  <setBody>
                      <simple>${bodyAs(java.lang.String) Additional text ignored...}</simple>
                  </setBody>
      

      The above seems a somewhat contrived example; However this is a more 'realistic' scenario in which the behaviour is not unexpected -

                  <setBody>
                      <simple>${bodyAs(java.lang.String).toUpperCase()}</simple>
                  </setBody>
      

      The above simple expression will simply set the body to be of type java.lang.String, however will not invoke the subsequent toUpperCase() call - likewise no error is reported to the developer.

      Camel has the same issue when using the function of headerAs and mandatoryBodyAs.

      Attachments

        Activity

          People

            njiang Willem Jiang
            alanfoster Alan Foster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: