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

Incorrect implementation of the method StringHelper.hasStartToken()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.12.2
    • 2.12.3, 2.13.0
    • camel-core
    • None
    • Novice

    Description

      From the semantic point of view the method hasStartToken() should return false in case of an expression without language specified, i.e. starting with "${".

      However, it is correct to return true in current usage of hasStartToken() in camel-core, i.e. checking if an expression is in simple language, since if the expression does not contain the language token, then it is a simple expression.

      The method calls for checking of simple language should be replaced with a newly created method isSimpleLanguage(String expression) that would check if the language is a simple expression, i.e. hasStartToken(expression, "simple") || expression.indexOf("${") >= 0.

      Attachments

        Activity

          People

            njiang Willem Jiang
            trohovsky Tomas Rohovsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: