camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isidro Moreno (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-5199) initialDelay and idempotentRepository Endpoint URI parameters fail to be read from Camel context when Turkish language is set in host operating system.
Date Fri, 20 Apr 2012 21:53:33 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-5199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Isidro Moreno updated CAMEL-5199:
---------------------------------

    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.
    
> initialDelay and idempotentRepository Endpoint URI parameters fail to be read from Camel
context when Turkish language is set in host operating system.
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5199
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5199
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.1
>         Environment: CamelContext Spring configuration. Versions: Camel 2.8.1 / Spring
3.0.
>            Reporter: Isidro Moreno
>              Labels: camel-core,, context, endpoint, spring
>             Fix For: 2.8.1
>
>         Attachments: ObjectHelper.java.patch, TurkishCapitalizationTest.java
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message