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

initialDelay and idempotentRepository Endpoint URI parameters fail to be read from Camel context when Turkish language is set in host operating system.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown

      Description

      org.apache.camel.util.ObjectHelper.capitalize() method uses native JAVA String.toUpperCase() method (without parameters), which performs capitalization according to operating system current language and regional settings configuration. When these are set to Turkish, a call to capitalize() method, with a String starting with "i" as parameter, returns Turkish dotted "I" as capitalized "i", which is wrong according to programmatic language and expected behavior.

      This behaviour impacts, at least, in Endpoint URI parameters which names start with char "i", such as "idempotentRepository" and "initialDelay" URI parameters. When setter/getter methods lookup is performed for these parameters, wrong method names are returned due to ObjectHelper.capitalize() method. This method uses standard Java String.toUpperCase() function which returns a dotted "I" instead of dotless "I" for idempotentRepository and initialDelay parameters.

      To solve this, the attached patch consists of refactoring ObjectHelper.capitalize() method. Instead of calling toUpperCase() method, it is called toUpperCase(Locale.ENGLISH) to enforce 'I' character (dotless) return.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              morenoisidro Isidro Moreno

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment