From 5b7d073b4ef2bd5303f0bffc818387df185b230e Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Mon, 19 Feb 2007 19:37:10 +0000 Subject: [PATCH] Protect against npe git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-4.1@509309 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/activemq/command/Message.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/command/Message.java b/activemq-core/src/main/java/org/apache/activemq/command/Message.java index e9b2afd072..a94b299f8b 100755 --- a/activemq-core/src/main/java/org/apache/activemq/command/Message.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/Message.java @@ -92,7 +92,10 @@ abstract public class Message extends BaseCommand implements MarshallAware, Mess copy.producerId = producerId; copy.transactionId = transactionId; copy.destination = destination; - copy.messageId = messageId.copy(); + if( messageId!=null ) + copy.messageId = messageId.copy(); + else + copy.messageId = messageId; copy.originalDestination = originalDestination; copy.originalTransactionId = originalTransactionId; copy.expiration = expiration;