You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Thomas Termin (JIRA)" <ji...@apache.org> on 2013/04/22 21:09:16 UTC

[jira] [Updated] (CAMEL-6302) Mina UDP default codec should keep the data as byte[]

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

Thomas Termin updated CAMEL-6302:
---------------------------------

    Attachment: camel-mina.patch

Attached is a patch with the changes for the codec and a test which results currently in an error. After the fix it will be successful.

                
> Mina UDP default codec should keep the data as byte[] 
> ------------------------------------------------------
>
>                 Key: CAMEL-6302
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6302
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mina
>    Affects Versions: 2.10.4
>            Reporter: Thomas Termin
>         Attachments: camel-mina.patch
>
>
> The MinaUdpProtocolCodecFactory on the consumer side decodes data from an udp datagram to a byte[].
>     byte[] bytes = context.getTypeConverter().convertTo(byte[].class, in);
> On the provider side where it gets back to the wire it gets converted to a string:
>     String value = context.getTypeConverter().convertTo(String.class, message);
> and then set to the ByteBuffer with the given charset.
> The result is that the original datagram is not valid anymore. The default codec should the data convert to a byte array or keep the data as byte array. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira