deal with possible null when text marshalled via xstream as munged ctr is used which bypasses default init

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1347621 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-06-07 14:02:00 +00:00
parent 1f862ba3cd
commit c0a8060ef6
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ public class MessageId implements DataStructure, Comparable<MessageId> {
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;
}