[jboss-cvs] JBoss Messaging SVN: r7868 - in branches/Branch_1_4: tests/src/org/jboss/test/messaging/jms/message and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Oct 26 04:33:59 EDT 2009
Author: gaohoward
Date: 2009-10-26 04:33:59 -0400 (Mon, 26 Oct 2009)
New Revision: 7868
Modified:
branches/Branch_1_4/src/main/org/jboss/jms/message/JBossMapMessage.java
branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/message/MapMessageTest.java
Log:
JBMESSAGING-1749
Modified: branches/Branch_1_4/src/main/org/jboss/jms/message/JBossMapMessage.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/message/JBossMapMessage.java 2009-10-26 08:14:10 UTC (rev 7867)
+++ branches/Branch_1_4/src/main/org/jboss/jms/message/JBossMapMessage.java 2009-10-26 08:33:59 UTC (rev 7868)
@@ -220,6 +220,8 @@
((Map)getPayload()).put(name, value);
else if (value instanceof byte[])
((Map)getPayload()).put(name, ((byte[]) value).clone());
+ else if (value == null)
+ ((Map)getPayload()).put(name, value);
else
throw new MessageFormatException("Invalid object type.");
Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/message/MapMessageTest.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/message/MapMessageTest.java 2009-10-26 08:14:10 UTC (rev 7867)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/message/MapMessageTest.java 2009-10-26 08:33:59 UTC (rev 7868)
@@ -84,6 +84,26 @@
assertNull(rm.getString("nullValue"));
}
+ //https://jira.jboss.org/jira/browse/JBMESSAGING-1749
+ public void testObjectNullValue() throws Exception
+ {
+ MapMessage m = session.createMapMessage();
+
+ m.setObject("nullObject", null);
+
+ queueProd.send(m);
+
+ MapMessage rm = (MapMessage)queueCons.receive(2000);
+
+ log.info("Got rm:" + rm);
+
+ assertNotNull(rm);
+
+ log.info("String is " + rm.getString("nullValue"));
+
+ assertNull(rm.getObject("nullObject"));
+ }
+
// Protected -----------------------------------------------------
protected void prepareMessage(Message m) throws JMSException
More information about the jboss-cvs-commits
mailing list