You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2017/07/25 13:15:56 UTC

qpid-broker-j git commit: QPID-7870: [Java Broker] Remove support for x-opt-jms-type message annotation

Repository: qpid-broker-j
Updated Branches:
  refs/heads/master d7a945953 -> e62586d18


QPID-7870: [Java Broker] Remove support for x-opt-jms-type message annotation


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/e62586d1
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/e62586d1
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/e62586d1

Branch: refs/heads/master
Commit: e62586d1837caeb6eabdf885b3afd183efbb54fb
Parents: d7a9459
Author: Keith Wall <kw...@apache.org>
Authored: Tue Jul 25 14:13:33 2017 +0100
Committer: Keith Wall <kw...@apache.org>
Committed: Tue Jul 25 14:13:33 2017 +0100

----------------------------------------------------------------------
 .../protocol/v1_0/MessageMetaData_1_0.java       | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/e62586d1/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
index 7dc1401..b9b93df 100755
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
@@ -35,9 +35,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.qpid.server.bytebuffer.QpidByteBuffer;
+import org.apache.qpid.server.bytebuffer.QpidByteBufferUtils;
 import org.apache.qpid.server.message.AMQMessageHeader;
 import org.apache.qpid.server.plugin.MessageMetaDataType;
-import org.apache.qpid.server.bytebuffer.QpidByteBufferUtils;
 import org.apache.qpid.server.protocol.v1_0.messaging.SectionDecoder;
 import org.apache.qpid.server.protocol.v1_0.messaging.SectionDecoderImpl;
 import org.apache.qpid.server.protocol.v1_0.type.AmqpErrorException;
@@ -69,7 +69,6 @@ public class MessageMetaData_1_0 implements StorableMessageMetaData
     private long _contentSize;
 
     // TODO move to somewhere more useful
-    private static final Symbol JMS_TYPE = Symbol.valueOf("x-opt-jms-type");
     private static final Symbol DELIVERY_TIME = Symbol.valueOf("x-opt-delivery-time");
     private static final Symbol NOT_VALID_BEFORE = Symbol.valueOf("x-qpid-not-valid-before");
 
@@ -615,21 +614,7 @@ public class MessageMetaData_1_0 implements StorableMessageMetaData
         @Override
         public String getType()
         {
-            String subject = getSubject();
-            if (subject != null)
-            {
-                return subject;
-            }
-
-            // Use legacy annotation if present and there was no subject
-            if (_messageAnnotationsSection == null || _messageAnnotationsSection.getValue().get(JMS_TYPE) == null)
-            {
-                return null;
-            }
-            else
-            {
-                return _messageAnnotationsSection.getValue().get(JMS_TYPE).toString();
-            }
+            return getSubject();
         }
 
         @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org