activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r760027 - /activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/kahadb/MessageKeys.java
Date Mon, 30 Mar 2009 16:17:36 GMT
Author: chirino
Date: Mon Mar 30 16:17:35 2009
New Revision: 760027

URL: http://svn.apache.org/viewvc?rev=760027&view=rev
Log:
fixing marshalling error

Modified:
    activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/kahadb/MessageKeys.java

Modified: activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/kahadb/MessageKeys.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/kahadb/MessageKeys.java?rev=760027&r1=760026&r2=760027&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/kahadb/MessageKeys.java
(original)
+++ activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/kahadb/MessageKeys.java
Mon Mar 30 16:17:35 2009
@@ -45,14 +45,16 @@
         }
 
         public MessageKeys readPayload(DataInput dataIn) throws IOException {
+            Location location = Marshallers.LOCATION_MARSHALLER.readPayload(dataIn);
             byte data[] = new byte[dataIn.readShort()];
-            return new MessageKeys(new AsciiBuffer(data), Marshallers.LOCATION_MARSHALLER.readPayload(dataIn));
+            dataIn.readFully(data);
+            return new MessageKeys(new AsciiBuffer(data), location);
         }
 
         public void writePayload(MessageKeys object, DataOutput dataOut) throws IOException
{
+            Marshallers.LOCATION_MARSHALLER.writePayload(object.location, dataOut);
             dataOut.writeShort(object.messageId.length);
             dataOut.write(object.messageId.data, object.messageId.offset, object.messageId.length);
-            Marshallers.LOCATION_MARSHALLER.writePayload(object.location, dataOut);
         }
     };
 }
\ No newline at end of file



Mime
View raw message