[
https://issues.apache.org/jira/browse/ARTEMIS-2454?focusedWorklogId=300981&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-300981
]
ASF GitHub Bot logged work on ARTEMIS-2454:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 26/Aug/19 02:11
Start Date: 26/Aug/19 02:11
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on pull request #2809:
ARTEMIS-2454 Fixing body re-encoding
URL: https://github.com/apache/activemq-artemis/pull/2809#discussion_r317430889
##########
File path:
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
##########
@@ -228,20 +227,23 @@ public MessageImpl getProtonMessage() {
* @return a copy of the Message Header if one exists or null if none
present.
*/
public Header getHeader() {
- ensureMessageDataScanned();
- ensureDataIsValid();
+ ensureScanning();
return scanForMessageSection(headerPosition, Header.class);
}
+ private void ensureScanning() {
+ ensureDataIsValid();
Review comment:
Before someone asks.. the inversion of order here was on purpose...
We need to first ensure the data buffer is valid, and if needed to be
re-encoded...
Then after the re-encoding, we need to re-scan the data.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 300981)
Time Spent: 1h (was: 50m)
> AMQPMessage re-encode may damage the message body and application properties.
> -----------------------------------------------------------------------------
>
> Key: ARTEMIS-2454
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2454
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.9.0
> Reporter: clebert suconic
> Assignee: clebert suconic
> Priority: Blocker
> Fix For: 2.10.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)