qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-7899) [Java 0-8...0-9-1 Client] Message#setJMSCorrelationIDAsBytes() erroneously converts the bytes to string
Date Wed, 08 Nov 2017 14:51:01 GMT

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

ASF subversion and git services commented on QPID-7899:
-------------------------------------------------------

Commit 8774a1c38d596e17683aac1a285ec437d82c7767 in qpid-jms-amqp-0-x's branch refs/heads/master
from [~lorenz.quack]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-jms-amqp-0-x.git;h=8774a1c ]

QPID-7897, QPID-7899: [Java Client, AMQP 0-x] Do not convert to/from String in Message#set-/getJMSCorrelationIDAsBytes()


> [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: Java Client
>            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


Mime
View raw message