You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2011/08/05 21:08:03 UTC

svn commit: r1154355 - /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala

Author: chirino
Date: Fri Aug  5 19:08:02 2011
New Revision: 1154355

URL: http://svn.apache.org/viewvc?rev=1154355&view=rev
Log:
Avoid NPE if the store does to provide a locator.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala?rev=1154355&r1=1154354&r2=1154355&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala Fri Aug  5 19:08:02 2011
@@ -881,7 +881,7 @@ class QueueEntry(val queue:Queue, val se
     qer.queue_key = queue.store_id
     qer.entry_seq = seq
     qer.message_key = state.message_key
-    qer.message_locator = state.message_locator.get()
+    qer.message_locator = Option(state.message_locator).map(_.get).getOrElse(0)
     qer.size = state.size
     qer.expiration = expiration
     qer