qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [3/5] git commit: Fix setCorrelationId calling setMessageId when the passed value is null. Also simplified the set correlation from bytes method to make findbugs happy.
Date Thu, 02 Oct 2014 21:47:37 GMT
Fix setCorrelationId calling setMessageId when the passed value is null.
Also simplified the set correlation from bytes method to make findbugs
happy.

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

Branch: refs/heads/master
Commit: e1478481bc9cdbcc93eca183267db79a1ba8cc1e
Parents: ac85f2f
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Oct 2 16:58:17 2014 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu Oct 2 16:58:17 2014 -0400

----------------------------------------------------------------------
 .../jms/provider/amqp/message/AmqpJmsMessageFacade.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e1478481/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 1859a47..ea3310a 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
@@ -417,7 +417,7 @@ public class AmqpJmsMessageFacade implements JmsMessageFacade {
     public void setCorrelationId(String correlationId) {
         AmqpMessageIdHelper messageIdHelper = AmqpMessageIdHelper.INSTANCE;
         if (correlationId == null) {
-            message.setMessageId(null);
+            message.setCorrelationId(null);
         } else {
             boolean appSpecific = false;
             boolean hasMessageIdPrefix = messageIdHelper.hasMessageIdPrefix(correlationId);
@@ -468,12 +468,12 @@ public class AmqpJmsMessageFacade implements JmsMessageFacade {
 
     @Override
     public void setCorrelationIdBytes(byte[] correlationId) {
-        if (correlationId == null) {
-            message.setCorrelationId(correlationId);
-        } else {
-            byte[] bytes = Arrays.copyOf(correlationId, correlationId.length);
-            message.setCorrelationId(new Binary(bytes));
+        Binary binaryIdValue = null;
+        if (correlationId != null) {
+            binaryIdValue = new Binary(Arrays.copyOf(correlationId, correlationId.length));
         }
+
+        message.setCorrelationId(binaryIdValue);
     }
 
     @Override


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


Mime
View raw message