Author: clebert.suconic(a)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
Show replies by date