qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject qpid-jms git commit: QPIDJMS-270 Use a new proton-j api to do some of the copying work
Date Thu, 09 Mar 2017 17:06:01 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 253c8d34b -> 812a046ed


QPIDJMS-270 Use a new proton-j api to do some of the copying work

let the Properties instance do the copy, and remove so unneeded null
checking. 

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/812a046e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/812a046e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/812a046e

Branch: refs/heads/master
Commit: 812a046ed2c656e879d90d125e8cfac48c291485
Parents: 253c8d3
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Mar 9 12:05:55 2017 -0500
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu Mar 9 12:05:55 2017 -0500

----------------------------------------------------------------------
 .../amqp/message/AmqpJmsMessageFacade.java      | 33 +++-----------------
 1 file changed, 4 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/812a046e/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacade.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacade.java
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacade.java
index 14b0c52..20dea80 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacade.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacade.java
@@ -248,10 +248,9 @@ public class AmqpJmsMessageFacade implements JmsMessageFacade {
 
     protected void copyInto(AmqpJmsMessageFacade target) {
         target.connection = connection;
-
-        if (consumerDestination != null) {
-            target.consumerDestination = consumerDestination;
-        }
+        target.consumerDestination = consumerDestination;
+        target.syntheticExpiration = syntheticExpiration;
+        target.userSpecifiedTTL = userSpecifiedTTL;
 
         if (destination != null) {
             target.setDestination(destination);
@@ -261,34 +260,10 @@ public class AmqpJmsMessageFacade implements JmsMessageFacade {
             target.setReplyTo(replyTo);
         }
 
-        if (syntheticExpiration != null) {
-            target.syntheticExpiration = syntheticExpiration;
-        }
-
-        if (userSpecifiedTTL != null) {
-            target.userSpecifiedTTL = userSpecifiedTTL;
-        }
-
         target.setAmqpHeader(header);
 
         if (properties != null) {
-            Properties targetProperties = new Properties();
-
-            targetProperties.setMessageId(properties.getMessageId());
-            targetProperties.setUserId(properties.getUserId());
-            targetProperties.setTo(properties.getTo());
-            targetProperties.setSubject(properties.getSubject());
-            targetProperties.setReplyTo(properties.getReplyTo());
-            targetProperties.setCorrelationId(properties.getCorrelationId());
-            targetProperties.setContentType(properties.getContentType());
-            targetProperties.setContentEncoding(properties.getContentEncoding());
-            targetProperties.setAbsoluteExpiryTime(properties.getAbsoluteExpiryTime());
-            targetProperties.setCreationTime(properties.getCreationTime());
-            targetProperties.setGroupId(properties.getGroupId());
-            targetProperties.setGroupSequence(properties.getGroupSequence());
-            targetProperties.setReplyToGroupId(properties.getReplyToGroupId());
-
-            target.setProperties(targetProperties);
+            target.setProperties(new Properties(properties));
         }
 
         target.setBody(body);


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


Mime
View raw message