activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1484049 - /activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
Date Sat, 18 May 2013 03:07:35 GMT
Author: chirino
Date: Sat May 18 03:07:35 2013
New Revision: 1484049

URL: http://svn.apache.org/r1484049
Log:
Try initializing the replicated leveldb response_callbacks early on to avoid potential NPE.

Modified:
    activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala

Modified: activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala?rev=1484049&r1=1484048&r2=1484049&view=diff
==============================================================================
--- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
(original)
+++ activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
Sat May 18 03:07:35 2013
@@ -184,6 +184,8 @@ class SlaveLevelDBStore extends LevelDBS
 
   class Session(transport:Transport, on_login: (Session)=>Unit) extends TransportHandler(transport)
{
 
+    val response_callbacks = new util.LinkedList[(ReplicationFrame)=>Unit]()
+
     override def onTransportFailure(error: IOException) {
       if( isStarted ) {
         warn("Unexpected session error: "+error)
@@ -237,7 +239,7 @@ class SlaveLevelDBStore extends LevelDBS
       response_callbacks.addLast(cb)
       send(action, body)
     }
-    val response_callbacks = new util.LinkedList[(ReplicationFrame)=>Unit]()
+
     def response_handler: (AnyRef)=>Unit = (command)=> {
       command match {
         case command:ReplicationFrame =>



Mime
View raw message