You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2015/12/11 00:18:56 UTC

qpid-jms git commit: QPIDJMS-140 Copy the correct value for readOnlyProperties during message copy.

Repository: qpid-jms
Updated Branches:
  refs/heads/master e19e7d014 -> b9627fb3a


QPIDJMS-140 Copy the correct value for readOnlyProperties during message
copy.

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

Branch: refs/heads/master
Commit: b9627fb3a2252e7d58cb43eee1667e7b19ca1362
Parents: e19e7d0
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Dec 10 18:18:39 2015 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Dec 10 18:18:39 2015 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/qpid/jms/message/JmsMessage.java      | 2 +-
 .../src/test/java/org/apache/qpid/jms/message/JmsMessageTest.java  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/b9627fb3/qpid-jms-client/src/main/java/org/apache/qpid/jms/message/JmsMessage.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/message/JmsMessage.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/message/JmsMessage.java
index f2123c7..75df588 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/message/JmsMessage.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/message/JmsMessage.java
@@ -57,7 +57,7 @@ public class JmsMessage implements javax.jms.Message {
 
     protected void copy(JmsMessage other) {
         this.readOnlyBody = other.readOnlyBody;
-        this.readOnlyProperties = other.readOnlyBody;
+        this.readOnlyProperties = other.readOnlyProperties;
         this.acknowledgeCallback = other.acknowledgeCallback;
         this.connection = other.connection;
         this.validatePropertyNames = other.validatePropertyNames;

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/b9627fb3/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTest.java
index 9ccd39f..2ad21a0 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTest.java
@@ -216,6 +216,7 @@ public class JmsMessageTest {
         msg1.setValidatePropertyNames(isValidate);
         JmsMessage msg2 = msg1.copy();
         assertEquals(msg1.getJMSMessageID(), msg2.getJMSMessageID());
+        assertTrue(msg2.isReadOnlyProperties());
         assertTrue(msg1.getJMSCorrelationID().equals(msg2.getJMSCorrelationID()));
         assertTrue(msg1.getJMSDestination().equals(msg2.getJMSDestination()));
         assertTrue(msg1.getJMSReplyTo().equals(msg2.getJMSReplyTo()));


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