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

Claus Ibsen resolved CAMEL-5171.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Future)
                   2.10.0
    
> Favor static methods for type converters provided by Camel components
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-5171
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5171
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.10.0
>
>
> We should favor static classes if possible for Camel type converters when 
> discovered and using @Converter. This allow to use a static method call, 
> instead of having to create a new instance of the class, to invoke the 
> converter method, for *every* type converstion.
> In most cases a type conversion class do not need to store state, and thus it 
> can be static method calls.
> An alternative is to allow a new attribute on @Converter at the class level, 
> where you can define if its thread safe or not.
> {code}
> @Converter(threadSafe = true)
> public class MyComponentConverters
> {code}

--
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

        

Reply via email to