mirror of
https://github.com/apache/activemq.git
synced 2025-02-13 13:36:07 +00:00
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@707059 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1f01c94d24
commit
537b1b0284
@ -1087,6 +1087,8 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
|
|||||||
writeDouble(((Double)value).doubleValue());
|
writeDouble(((Double)value).doubleValue());
|
||||||
} else if (value instanceof byte[]) {
|
} else if (value instanceof byte[]) {
|
||||||
writeBytes((byte[])value);
|
writeBytes((byte[])value);
|
||||||
|
}else if (value instanceof Long) {
|
||||||
|
writeLong(((Long)value).longValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,6 +409,11 @@ public class ActiveMQStreamMessageTest extends TestCase {
|
|||||||
fail("Should have thrown exception");
|
fail("Should have thrown exception");
|
||||||
} catch (MessageFormatException mfe) {
|
} catch (MessageFormatException mfe) {
|
||||||
}
|
}
|
||||||
|
msg = new ActiveMQStreamMessage();
|
||||||
|
msg.writeObject(new Long("1"));
|
||||||
|
// reset so it's readable now
|
||||||
|
msg.reset();
|
||||||
|
assertEquals(new Long("1"), msg.readObject());
|
||||||
} catch (JMSException jmsEx) {
|
} catch (JMSException jmsEx) {
|
||||||
jmsEx.printStackTrace();
|
jmsEx.printStackTrace();
|
||||||
assertTrue(false);
|
assertTrue(false);
|
||||||
@ -474,7 +479,7 @@ public class ActiveMQStreamMessageTest extends TestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testReadDouble() {
|
public void testReadDouble() {
|
||||||
ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
|
ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
|
||||||
try {
|
try {
|
||||||
double test = 4.4d;
|
double test = 4.4d;
|
||||||
@ -535,6 +540,7 @@ public class ActiveMQStreamMessageTest extends TestCase {
|
|||||||
jmsEx.printStackTrace();
|
jmsEx.printStackTrace();
|
||||||
assertTrue(false);
|
assertTrue(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testReadString() {
|
public void testReadString() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user