activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r408776 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
Date Mon, 22 May 2006 22:43:36 GMT
Author: chirino
Date: Mon May 22 15:43:35 2006
New Revision: 408776

URL: http://svn.apache.org/viewvc?rev=408776&view=rev
Log:
Applied patch at https://issues.apache.org/activemq/browse/AMQ-718

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java?rev=408776&r1=408775&r2=408776&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
Mon May 22 15:43:35 2006
@@ -233,11 +233,15 @@
 	            BooleanStream bs = new BooleanStream();
 	            size += dsm.tightMarshal1(this, c, bs);
 	            size += bs.marshalledSize(); 
-	
-	            dataOut.writeInt(size);
+
+                if( !sizePrefixDisabled ) {
+                    dataOut.writeInt(size);
+                }
+                
 	            dataOut.writeByte(type);            
 	            bs.marshal(dataOut);
 	            dsm.tightMarshal2(this, c, dataOut, bs);
+                
             } else {            	
             	DataOutputStream looseOut = dataOut;
             	ByteArrayOutputStream baos=null;
@@ -253,7 +257,7 @@
                 if( !sizePrefixDisabled ) {
                     looseOut.close();
                     ByteSequence sequence = baos.toByteSequence();
-                    dataOut.writeInt(sequence.getLength()-4);
+                    dataOut.writeInt(sequence.getLength());
                     dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
                 }
 



Mime
View raw message