You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alex Rudyy (JIRA)" <ji...@apache.org> on 2017/11/22 09:31:03 UTC

[jira] [Closed] (QPID-7899) [Java 0-8...0-9-1 Client] Message#setJMSCorrelationIDAsBytes() erroneously converts the bytes to string

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

Alex Rudyy closed QPID-7899.
----------------------------

> [Java 0-8...0-9-1 Client] Message#setJMSCorrelationIDAsBytes() erroneously converts the bytes to string
> -------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-7899
>                 URL: https://issues.apache.org/jira/browse/QPID-7899
>             Project: Qpid
>          Issue Type: Bug
>          Components: JMS AMQP 0-x
>            Reporter: Lorenz Quack
>             Fix For: qpid-java-client-0-x-6.3.0
>
>
> The client converts the {{byte[]}} passed in to {{javax.jms.Message#setJMSCorrelationIDAsBytes}} to a String via {{new String(bytes);}}.
> If the bytes are not the encoding of a String in the current default encoding (in which case why would you use this method in the first place), this is wrong.
> In the JMS API implementation of  {{setJMSCorrelationIDAsBytes()/getJMSCorrelationIDAsBytes()}} is optional and it explicitly allows the provider to throw {{java.lang.UnsupportedOperationException}}.
> We should either pack the raw bytes into the {{AMQShortString}} or throw {{UnsupportedOperationException}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org