mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-2919 - Deflater.end() should be called from ActiveMQBytesMessage
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@997290 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5bf3696c81
commit
a0b017611b
|
@ -785,7 +785,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag
|
|||
}
|
||||
length = 0;
|
||||
compressed = true;
|
||||
Deflater deflater = new Deflater(Deflater.BEST_SPEED);
|
||||
final Deflater deflater = new Deflater(Deflater.BEST_SPEED);
|
||||
os = new FilterOutputStream(new DeflaterOutputStream(os, deflater)) {
|
||||
public void write(byte[] arg0) throws IOException {
|
||||
length += arg0.length;
|
||||
|
@ -801,6 +801,12 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag
|
|||
length++;
|
||||
out.write(arg0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
deflater.end();
|
||||
super.close();
|
||||
}
|
||||
};
|
||||
}
|
||||
this.dataOut = new DataOutputStream(os);
|
||||
|
|
Loading…
Reference in New Issue