[jboss-cvs] JBoss Messaging SVN: r3284 - in branches/Branch_Stable: src/main/org/jboss/messaging/util and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 2 16:36:42 EDT 2007
Author: clebert.suconic at jboss.com
Date: 2007-11-02 16:36:42 -0400 (Fri, 02 Nov 2007)
New Revision: 3284
Modified:
branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/message/MessageSupport.java
branches/Branch_Stable/src/main/org/jboss/messaging/util/StreamUtils.java
branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/message/ObjectMessageTest.java
Log:
JBMESSAGING-1138 - fix for object types
Modified: branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/message/MessageSupport.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/message/MessageSupport.java 2007-11-01 17:14:38 UTC (rev 3283)
+++ branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/message/MessageSupport.java 2007-11-02 20:36:42 UTC (rev 3284)
@@ -212,7 +212,7 @@
{
ByteArrayOutputStream bos = new ByteArrayOutputStream(BUFFER_SIZE);
DataOutputStream daos = new DataOutputStream(bos);
- StreamUtils.writeObject(daos, payload, true, true);
+ StreamUtils.writeObject(daos, payload, false, true);
daos.close();
payloadAsByteArray = bos.toByteArray();
Modified: branches/Branch_Stable/src/main/org/jboss/messaging/util/StreamUtils.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/messaging/util/StreamUtils.java 2007-11-01 17:14:38 UTC (rev 3283)
+++ branches/Branch_Stable/src/main/org/jboss/messaging/util/StreamUtils.java 2007-11-02 20:36:42 UTC (rev 3284)
@@ -240,7 +240,7 @@
{
out.write(LIST);
writeList(out, (List)object);
- }
+ }
else if (object instanceof Serializable)
{
out.writeByte(SERIALIZABLE);
Modified: branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/message/ObjectMessageTest.java
===================================================================
--- branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/message/ObjectMessageTest.java 2007-11-01 17:14:38 UTC (rev 3283)
+++ branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/message/ObjectMessageTest.java 2007-11-02 20:36:42 UTC (rev 3284)
@@ -111,6 +111,23 @@
}
+
+ public void testVecorOnObjectMessage() throws Exception
+ {
+ java.util.Vector vectorOnMessage = new java.util.Vector();
+ vectorOnMessage.add("world!");
+ ((ObjectMessage)message).setObject(vectorOnMessage);
+
+ queueProd.send(message);
+
+ ObjectMessage r = (ObjectMessage) queueCons.receive(5000);
+ assertNotNull(r);
+
+ java.util.Vector v2 = (java.util.Vector) r.getObject();
+
+ assertEquals(vectorOnMessage.get(0), v2.get(0));
+ }
+
// Protected ------------------------------------------------------------------------------------
protected void prepareMessage(Message m) throws JMSException
More information about the jboss-cvs-commits
mailing list