This is an automated email from the ASF dual-hosted git repository. rskraba pushed a commit to branch branch-1.10 in repository https://gitbox.apache.org/repos/asf/avro.git
commit 806667cb2b18e45d16fff25514c17a0272db2b2d Author: Dongjoon Hyun <dongj...@apache.org> AuthorDate: Tue Mar 9 07:52:33 2021 -0800 AVRO-3072: Use ZSTD NoFinalizer classes and bump to 1.4.9-1 (#1129) --- .../avro/src/main/java/org/apache/avro/file/ZstandardLoader.java | 8 ++++---- lang/java/pom.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/java/avro/src/main/java/org/apache/avro/file/ZstandardLoader.java b/lang/java/avro/src/main/java/org/apache/avro/file/ZstandardLoader.java index 1819a65..8cfb463 100644 --- a/lang/java/avro/src/main/java/org/apache/avro/file/ZstandardLoader.java +++ b/lang/java/avro/src/main/java/org/apache/avro/file/ZstandardLoader.java @@ -25,8 +25,8 @@ import com.github.luben.zstd.BufferPool; import com.github.luben.zstd.NoPool; import com.github.luben.zstd.RecyclingBufferPool; import com.github.luben.zstd.Zstd; -import com.github.luben.zstd.ZstdInputStream; -import com.github.luben.zstd.ZstdOutputStream; +import com.github.luben.zstd.ZstdInputStreamNoFinalizer; +import com.github.luben.zstd.ZstdOutputStreamNoFinalizer; /* causes lazier classloader initialization of ZStandard libraries, so that * we get NoClassDefFoundError when we try and use the Codec's compress @@ -35,14 +35,14 @@ final class ZstandardLoader { static InputStream input(InputStream compressed, boolean useBufferPool) throws IOException { BufferPool pool = useBufferPool ? RecyclingBufferPool.INSTANCE : NoPool.INSTANCE; - return new ZstdInputStream(compressed, pool); + return new ZstdInputStreamNoFinalizer(compressed, pool); } static OutputStream output(OutputStream compressed, int level, boolean checksum, boolean useBufferPool) throws IOException { int bounded = Math.max(Math.min(level, Zstd.maxCompressionLevel()), Zstd.minCompressionLevel()); BufferPool pool = useBufferPool ? RecyclingBufferPool.INSTANCE : NoPool.INSTANCE; - ZstdOutputStream zstdOutputStream = new ZstdOutputStream(compressed, pool).setLevel(bounded); + ZstdOutputStreamNoFinalizer zstdOutputStream = new ZstdOutputStreamNoFinalizer(compressed, pool).setLevel(bounded); zstdOutputStream.setCloseFrameOnFlush(false); zstdOutputStream.setChecksum(checksum); return zstdOutputStream; diff --git a/lang/java/pom.xml b/lang/java/pom.xml index 8e576a8..a03acf7 100644 --- a/lang/java/pom.xml +++ b/lang/java/pom.xml @@ -58,7 +58,7 @@ <easymock.version>4.2</easymock.version> <hamcrest.version>2.2</hamcrest.version> <grpc.version>1.36.0</grpc.version> - <zstd-jni.version>1.4.8-7</zstd-jni.version> + <zstd-jni.version>1.4.9-1</zstd-jni.version> <!-- version properties for plugins --> <archetype-plugin.version>3.2.0</archetype-plugin.version> <bundle-plugin-version>4.1.0</bundle-plugin-version>