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
|
@ -234,10 +234,14 @@ final public class OpenWireFormat implements WireFormat {
|
||||||
size += dsm.tightMarshal1(this, c, bs);
|
size += dsm.tightMarshal1(this, c, bs);
|
||||||
size += bs.marshalledSize();
|
size += bs.marshalledSize();
|
||||||
|
|
||||||
dataOut.writeInt(size);
|
if( !sizePrefixDisabled ) {
|
||||||
|
dataOut.writeInt(size);
|
||||||
|
}
|
||||||
|
|
||||||
dataOut.writeByte(type);
|
dataOut.writeByte(type);
|
||||||
bs.marshal(dataOut);
|
bs.marshal(dataOut);
|
||||||
dsm.tightMarshal2(this, c, dataOut, bs);
|
dsm.tightMarshal2(this, c, dataOut, bs);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
DataOutputStream looseOut = dataOut;
|
DataOutputStream looseOut = dataOut;
|
||||||
ByteArrayOutputStream baos=null;
|
ByteArrayOutputStream baos=null;
|
||||||
|
@ -253,7 +257,7 @@ final public class OpenWireFormat implements WireFormat {
|
||||||
if( !sizePrefixDisabled ) {
|
if( !sizePrefixDisabled ) {
|
||||||
looseOut.close();
|
looseOut.close();
|
||||||
ByteSequence sequence = baos.toByteSequence();
|
ByteSequence sequence = baos.toByteSequence();
|
||||||
dataOut.writeInt(sequence.getLength()-4);
|
dataOut.writeInt(sequence.getLength());
|
||||||
dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
|
dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue