activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1403302 - /activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/codec/BaseDataStreamMarshaller.java
Date Mon, 29 Oct 2012 14:10:48 GMT
Author: chirino
Date: Mon Oct 29 14:10:48 2012
New Revision: 1403302

URL: http://svn.apache.org/viewvc?rev=1403302&view=rev
Log:
Fixes an openwire decoding bug.

Modified:
    activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/codec/BaseDataStreamMarshaller.java

Modified: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/codec/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/codec/BaseDataStreamMarshaller.java?rev=1403302&r1=1403301&r2=1403302&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/codec/BaseDataStreamMarshaller.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/codec/BaseDataStreamMarshaller.java
Mon Oct 29 14:10:48 2012
@@ -284,7 +284,12 @@ public abstract class BaseDataStreamMars
         if (bs.readBoolean()) {
             boolean ascii = bs.readBoolean(); // ignored for now.
             int size = dataIn.readShort();
-            return dataIn.readBuffer(size).utf8();
+            if( size== 0 ) {
+                return new UTF8Buffer("");
+            } else {
+                Buffer buffer = dataIn.readBuffer(size);
+                return buffer.utf8();
+            }
         } else {
             return null;
         }



Mime
View raw message