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

ASF subversion and git services commented on QPIDJMS-617:
---------------------------------------------------------

Commit 3be921712bf30d40a2eec5d0e7a51e81eeda0197 in qpid-jms's branch 
refs/heads/main from Daniil Kirilyuk
[ https://gitbox.apache.org/repos/asf?p=qpid-jms.git;h=3be92171 ]

QPIDJMS-617: BytesMessage increments the read pointer position on 
MessageFormatException

Reset the read pointer position in JmsBytesMessage#readUTF() in case of a 
MessageFormatException to allow additional reads of the message data.

> BytesMessage increments the read pointer position on MessageFormatException
> ---------------------------------------------------------------------------
>
>                 Key: QPIDJMS-617
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-617
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>    Affects Versions: 2.9.0
>            Reporter: Daniil Kirilyuk
>            Priority: Minor
>             Fix For: 2.10.0
>
>
> Jakarta Messaging specification version 3.1 states in chapter 
> [3.11.3|https://jakarta.ee/specifications/messaging/3.1/jakarta-messaging-spec-3.1#conversions-provided-by-streammessage-and-mapmessage]:
> "If a read method of StreamMessage or BytesMessage throws a 
> MessageFormatException or NumberFormatException, the current position of the 
> read pointer must not be incremented. A subsequent read must be capable of 
> recovering from the exception by rereading the data as a different type".
> Currently JmsBytesMessage increments the read pointer position, making it 
> impossible to reread the data after the exception.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to