activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r707059 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/command/ActiveMQStreamMessage.java test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java
Date Wed, 22 Oct 2008 12:45:30 GMT
Author: rajdavies
Date: Wed Oct 22 05:45:30 2008
New Revision: 707059

URL: http://svn.apache.org/viewvc?rev=707059&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1965

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java?rev=707059&r1=707058&r2=707059&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
Wed Oct 22 05:45:30 2008
@@ -1087,7 +1087,9 @@
             writeDouble(((Double)value).doubleValue());
         } else if (value instanceof byte[]) {
             writeBytes((byte[])value);
-        }
+        }else if (value instanceof Long) {
+            writeLong(((Long)value).longValue());
+        } 
     }
 
     /**

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java?rev=707059&r1=707058&r2=707059&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java
Wed Oct 22 05:45:30 2008
@@ -409,6 +409,11 @@
                 fail("Should have thrown exception");
             } 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) {
             jmsEx.printStackTrace();
             assertTrue(false);
@@ -474,7 +479,7 @@
         }
     }
 
-    public void testReadDouble() {
+    public void testReadDouble()  {
         ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
         try {
             double test = 4.4d;
@@ -535,6 +540,7 @@
             jmsEx.printStackTrace();
             assertTrue(false);
         }
+      
     }
 
     public void testReadString() {



Mime
View raw message