camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-2056) Optional charset parameter in convertBodyTo is ignored by most converters in IOConverter
Date Wed, 14 Oct 2009 11:41:53 GMT

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

Claus Ibsen commented on CAMEL-2056:
------------------------------------

Reworked patch to avoid ignoring charset issue. Also people should not use the converters
directly but use the Camel TypeConverterRegistry.

trunk: 825090.

> Optional charset parameter in convertBodyTo is ignored by most converters in IOConverter
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2056
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2056
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0.0
>            Reporter: Martin Krasser
>            Assignee: Willem Jiang
>             Fix For: 2.1.0
>
>         Attachments: camel-core.patch
>
>
> Most of the converters in IOConverter that do a char <-> byte conversion ignore
the charset given as second argument to convertBodyTo. The attached patch fixes this.
> * For relevant converter methods, it introduces an additional second Exchange parameter
from which the desired charset is obtained.
> * For backwards compatibility to code that uses the IOConverter directly, a one-parameter
version of these methods was kept but the @Converter annotation was removed (Camel doesn't
allow overloaded static type converter methods to be registered i.e. they overwrite in other
in the registry).
> * The patch furthermore removes existing redundancies in code like getting the charset
from the exchange, check if the exchange is null etc.
> * The String->byte[] converter from ObjectConverter was moved to IOConverter because
its implementation is more closely related to other methods in this converter class.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message