[hornetq-commits] JBoss hornetq SVN: r11616 - trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Oct 28 09:00:52 EDT 2011


Author: borges
Date: 2011-10-28 09:00:52 -0400 (Fri, 28 Oct 2011)
New Revision: 11616

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
Log:
Fix NPE, when replicationEndpoint is closed before initialization.

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java	2011-10-28 13:00:40 UTC (rev 11615)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java	2011-10-28 13:00:52 UTC (rev 11616)
@@ -330,11 +330,15 @@
       }
 
       filesReservedForSync.clear();
-      for (Journal j : journals)
+      if (journals != null)
       {
-         if (j instanceof FileWrapperJournal)
-            j.stop();
+         for (Journal j : journals)
+         {
+            if (j instanceof FileWrapperJournal)
+               j.stop();
+         }
       }
+
       pageManager.stop();
 
       // Storage needs to be the last to stop



More information about the hornetq-commits mailing list