mirror of https://github.com/apache/activemq.git
Applied patch at https://issues.apache.org/activemq/browse/AMQ-718
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@408776 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
deff26029f
commit
d671875ebf
|
@ -233,11 +233,15 @@ final public class OpenWireFormat implements WireFormat {
|
|||
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 @@ final public class OpenWireFormat implements WireFormat {
|
|||
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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue