camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-5171) Favor static methods for type converters provided by Camel components
Date Mon, 23 Apr 2012 04:49:42 GMT

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

Claus Ibsen updated CAMEL-5171:
-------------------------------

    Fix Version/s: 2.9.3
    
> 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.9.3, 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

        

Mime
View raw message