From 48b5563241a28563a72d83431790b2f6b45b1582 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Wed, 10 Oct 2018 12:09:40 -0400 Subject: [PATCH] ARTEMIS-2096 Fixing DivertTopicToQueueTest This is fixing the test org.apache.activemq.artemis.tests.integration.amqp.DivertTopicToQueueTest This test was broken because the copy wouldn't use the Buffer view gotten by data.duplicate(). --- .../activemq/artemis/protocol/amqp/broker/AMQPMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java index 821356a6ad..c7f1b506f8 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java @@ -497,7 +497,7 @@ public class AMQPMessage extends RefCountMessage { // Copy the full message contents with delivery annotations as they will // be trimmed on send and may become useful on the broker at a later time. - data.get(newData); + view.get(newData); AMQPMessage newEncode = new AMQPMessage(this.messageFormat, newData, extraProperties, coreMessageObjectPools); newEncode.setMessageID(this.getMessageID());