From 58c4a0be70393fbf023ff19cd6ed6dc641dceaf4 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 5 Sep 2014 13:59:10 -0700 Subject: [PATCH] Internal: Change LZFCompressedStreamOutput to use buffer recycler when allocating encoder closes #7613 --- .../common/compress/lzf/LZFCompressedStreamOutput.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/elasticsearch/common/compress/lzf/LZFCompressedStreamOutput.java b/src/main/java/org/elasticsearch/common/compress/lzf/LZFCompressedStreamOutput.java index 9fc8705faa187..36caadbeefe06 100644 --- a/src/main/java/org/elasticsearch/common/compress/lzf/LZFCompressedStreamOutput.java +++ b/src/main/java/org/elasticsearch/common/compress/lzf/LZFCompressedStreamOutput.java @@ -28,8 +28,6 @@ import java.io.IOException; -/** - */ public class LZFCompressedStreamOutput extends CompressedStreamOutput { private final BufferRecycler recycler; @@ -40,7 +38,7 @@ public LZFCompressedStreamOutput(StreamOutput out) throws IOException { this.recycler = BufferRecycler.instance(); this.uncompressed = this.recycler.allocOutputBuffer(LZFChunk.MAX_CHUNK_LEN); this.uncompressedLength = LZFChunk.MAX_CHUNK_LEN; - this.encoder = ChunkEncoderFactory.safeInstance(); + this.encoder = ChunkEncoderFactory.safeInstance(recycler); } @Override