From 6bb4aa7a106de94895eda1fe65bda0f76da13189 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Sun, 17 Oct 2021 20:06:51 -0400 Subject: [PATCH] ARTEMIS-3529 Moving addItem from AMQP and Core into upper class --- .../apache/activemq/artemis/core/message/impl/CoreMessage.java | 2 -- .../artemis/core/message/openmbean/MessageOpenTypeFactory.java | 2 +- .../activemq/artemis/protocol/amqp/broker/AMQPMessage.java | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java index 1d5acdae20..981f55bf2f 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java @@ -1336,7 +1336,6 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage { protected void init() throws OpenDataException { super.init(); body = new ArrayType(SimpleType.BYTE, true); - addItem(CompositeDataConstants.TYPE, CompositeDataConstants.TYPE_DESCRIPTION, SimpleType.BYTE); addItem(CompositeDataConstants.BODY, CompositeDataConstants.BODY_DESCRIPTION, body); } @@ -1360,7 +1359,6 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage { @Override protected void init() throws OpenDataException { super.init(); - addItem(CompositeDataConstants.TYPE, CompositeDataConstants.TYPE_DESCRIPTION, SimpleType.BYTE); addItem(CompositeDataConstants.TEXT_BODY, CompositeDataConstants.TEXT_BODY, SimpleType.STRING); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/openmbean/MessageOpenTypeFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/openmbean/MessageOpenTypeFactory.java index 0028051c91..dee38d3554 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/openmbean/MessageOpenTypeFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/openmbean/MessageOpenTypeFactory.java @@ -74,7 +74,7 @@ public class MessageOpenTypeFactory { } protected void init() throws OpenDataException { - + addItem(CompositeDataConstants.TYPE, CompositeDataConstants.TYPE_DESCRIPTION, SimpleType.BYTE); addItem(CompositeDataConstants.ADDRESS, CompositeDataConstants.ADDRESS_DESCRIPTION, SimpleType.STRING); addItem(CompositeDataConstants.MESSAGE_ID, CompositeDataConstants.MESSAGE_ID_DESCRIPTION, SimpleType.STRING); addItem(CompositeDataConstants.USER_ID, CompositeDataConstants.USER_ID_DESCRIPTION, SimpleType.STRING); 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 0609a76b43..54aa270d3c 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 @@ -1803,7 +1803,6 @@ public abstract class AMQPMessage extends RefCountMessage implements org.apache. protected void init() throws OpenDataException { super.init(); addItem(CompositeDataConstants.TEXT_BODY, CompositeDataConstants.TEXT_BODY, SimpleType.STRING); - addItem(CompositeDataConstants.TYPE, CompositeDataConstants.TYPE_DESCRIPTION, SimpleType.BYTE); } @Override