[
https://issues.apache.org/jira/browse/QPIDJMS-622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18065482#comment-18065482
]
ASF subversion and git services commented on QPIDJMS-622:
---------------------------------------------------------
Commit de04f3757d8762cb987bba27c1f6d635a1a0de53 in qpid-jms's branch
refs/heads/main from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=qpid-jms.git;h=de04f375 ]
QPIDJMS-622 receiveBody must throw if type is Message or StreamMessage
When the next message is of type Message or StreamMessage the specification
requires we throw an exception vs calling into getBody which for Message at
least the specification has conflicting rules which simply returns null for
all types requested.
> JMSConsumer receiveBody should throw if message is a bare Message instance
> --------------------------------------------------------------------------
>
> Key: QPIDJMS-622
> URL: https://issues.apache.org/jira/browse/QPIDJMS-622
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 2.10.0, 1.16.0
> Reporter: Timothy A. Bish
> Assignee: Timothy A. Bish
> Priority: Minor
> Fix For: 2.11.0
>
>
> According the the specification when calling JMSConsumer#receiveBody methods
> the base Message and StreamMessage types should result in an
> MessageFormatRuntimeException but we currently call straight into
> Message#getBody which by spec does allow calls and returns null for all
> types. Due to this disparity we need to handle the call in JMSConsumer
> differently and check that the messages are in fact in the set of allowed JMS
> message types we can access via getBody calls on the message.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]