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

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Jan 5 08:12:52 EST 2012


Author: clebert.suconic at jboss.com
Date: 2012-01-05 08:12:52 -0500 (Thu, 05 Jan 2012)
New Revision: 11971

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
Log:
JBPAPP-7829 fixing NPE on NettyBridgeTest

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java	2012-01-05 12:06:33 UTC (rev 11970)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java	2012-01-05 13:12:52 UTC (rev 11971)
@@ -1136,6 +1136,12 @@
          log.trace("send(message=" + message + ", direct=" + direct + ") being called");
       }
 
+      if (message.getAddress() == null)
+      {
+         // This could happen with some tests that are ignoring messages
+         throw new HornetQException(HornetQException.ILLEGAL_STATE, "You don't have an address at the Server's Session");
+      }
+
       if (message.getAddress().equals(managementAddress))
       {
          // It's a management message



More information about the hornetq-commits mailing list