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

Simple expression "${headers.CamelHttpUrl} contains 'foo'" never becomes true

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.10.5, 2.11.2, 2.12.1
    • Fix Version/s: 2.11.3, 2.12.2, 2.13.0
    • Component/s: camel-core, camel-jetty
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The exchange header CamelHttpUrl is of type StringBuffer and not String. This causes the simple expression "${headers.CamelHttpUrl} contains 'foo'" to always evaluate to false, because org.apache.camel.util.ObjectHelper::contains(Object,Object) does not handle StringBuffer.

      Either the header should be of type String or org.apache.camel.util.ObjectHelper::contains(Object,Object) should deal with StringBuffer arguments.

        Attachments

        1. jetty-CamelHttpUrl-context.xml
          2 kB
          Ralf Steppacher

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              rsteppac Ralf Steppacher
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: