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

Willem Jiang resolved CAMEL-2056.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0

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

Reply via email to