You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2012/06/07 16:02:01 UTC

svn commit: r1347621 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java

Author: gtully
Date: Thu Jun  7 14:02:00 2012
New Revision: 1347621

URL: http://svn.apache.org/viewvc?rev=1347621&view=rev
Log:
deal with possible null when text marshalled via xstream as munged ctr is used which bypasses default init

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java?rev=1347621&r1=1347620&r2=1347621&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java Thu Jun  7 14:02:00 2012
@@ -152,7 +152,7 @@ public class MessageId implements DataSt
         MessageId copy = new MessageId(producerId, producerSequenceId);
         copy.key = key;
         copy.brokerSequenceId = brokerSequenceId;
-        copy.dataLocator = new AtomicReference<Object>(dataLocator.get());
+        copy.dataLocator = new AtomicReference<Object>(dataLocator != null ? dataLocator.get() : null);
         return copy;
     }