Author: clebert.suconic(a)jboss.com
Date: 2012-01-04 21:01:37 -0500 (Wed, 04 Jan 2012)
New Revision: 11967
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
Log:
JBPAPP-7829 fixing NPE on Security Test
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-04
19:28:55 UTC (rev 11966)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2012-01-05
02:01:37 UTC (rev 11967)
@@ -1105,12 +1105,17 @@
public void send(final ServerMessage message, final boolean direct) throws Exception
{
long id = storageManager.generateUniqueID();
-
+
SimpleString address = message.getAddress();
message.setMessageID(id);
message.encodeMessageIDToBuffer();
+ if (defaultAddress == null && address != null)
+ {
+ defaultAddress = address;
+ }
+
if (address == null)
{
if (message.isDurable())
@@ -1131,6 +1136,7 @@
log.trace("send(message=" + message + ", direct=" + direct +
") being called");
}
+ log.info("message " + message + " managementAddress = " +
managementAddress);
if (message.getAddress().equals(managementAddress))
{
// It's a management message
@@ -1141,11 +1147,6 @@
{
doSend(message, direct);
}
-
- if (defaultAddress == null)
- {
- defaultAddress = address;
- }
}
public void sendContinuations(final int packetSize,
Show replies by date