[hornetq-commits] JBoss hornetq SVN: r11915 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Dec 20 09:02:25 EST 2011


Author: clebert.suconic at jboss.com
Date: 2011-12-20 09:02:24 -0500 (Tue, 20 Dec 2011)
New Revision: 11915

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
Log:
JBPAPP-7792 -  avoiding a NPE

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java	2011-12-19 17:57:47 UTC (rev 11914)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java	2011-12-20 14:02:24 UTC (rev 11915)
@@ -562,12 +562,20 @@
    public void onConnection(ClientSessionFactoryInternal sf)
    {
       TopologyMember localMember = getLocalMember();
-      sf.sendNodeAnnounce(localMember.getUniqueEventID(),
-                          manager.getNodeId(),
-                          false,
-                          localMember.getConnector().getA(),
-                          localMember.getConnector().getB());
+      if (localMember != null)
+      {
+         sf.sendNodeAnnounce(localMember.getUniqueEventID(),
+                             manager.getNodeId(),
+                             false,
+                             localMember.getConnector().getA(),
+                             localMember.getConnector().getB());
+      }
+      else
+      {
+         log.warn("LocalMember is not set at on ClusterConnection " + this);
+      }
 
+      // TODO: shouldn't we send the current time here? and change the current topology?
       // sf.sendNodeAnnounce(System.currentTimeMillis(),
       // manager.getNodeId(),
       // false,



More information about the hornetq-commits mailing list