camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5172) TypeConverter - Tighten up API to rethrow failed exception during type conversion, and introduce new API for try to convert
Date Thu, 10 May 2012 18:52:47 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272636#comment-13272636
] 

Christian Müller commented on CAMEL-5172:
-----------------------------------------

Babak, please be careful with -1 votes on code modifications. -1 *AND* a comment "let's do
it in your way" are contrary.
Votes for code modifications are binding votes as described here [1]. This means some time
in the future, where you may are a PMC and vote with -1, the committer has to convince you
or he has to roll back the change.
This *NOT* mean you should not express your meaning, but you should know what a -1 could imply
in the future...

[1] http://www.apache.org/foundation/voting.html

Best,
Christian
                
> TypeConverter - Tighten up API to rethrow failed exception during type conversion, and
introduce new API for try to convert
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5172
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5172
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.8.5, 2.9.3, 2.10.0
>
>
> The org.apache.camel.TypeConverter API would not propagate exceptions that would occur
during type conversion back to the caller. But instead return null.
> We should tighten this up and introduce a new API for trying to convert, so what we would
have is
> - convertTo = converts, and throws exception if failure during conversion, can return
null, if no value to convert, or no type converter exists to do this
> - mandatoryConvertTo = convertTo + will throw exception if no value, eg it never returns
null
> - *new* tryConvertTo = convertTo but will catch exceptions and return null (like the
old behavior)
> This introduces an API change in TypeConverter. But it is more intuitive. There is some
internal logic that needs to be adjust a bit due they rely on the old behavior.

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