From 62b3df4aee570b940fafc40ad6021fddaf1c35e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= Date: Thu, 4 Dec 2025 07:44:04 +0100 Subject: [PATCH 4/4] Undeclared LZ4JavaSafeFastDecompressor --- src/java/net/jpountz/lz4/LZ4Factory.java | 6 +----- src/test/net/jpountz/lz4/LZ4FactoryTest.java | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/java/net/jpountz/lz4/LZ4Factory.java b/src/java/net/jpountz/lz4/LZ4Factory.java index e4f2e97..b2ec479 100644 --- a/src/java/net/jpountz/lz4/LZ4Factory.java +++ b/src/java/net/jpountz/lz4/LZ4Factory.java @@ -237,11 +237,7 @@ public final class LZ4Factory { this.impl = impl; fastCompressor = classInstance("net.jpountz.lz4.LZ4" + impl + "Compressor"); highCompressor = classInstance("net.jpountz.lz4.LZ4HC" + impl + "Compressor"); - if (insecureFastDecompressor) { - fastDecompressor = classInstance("net.jpountz.lz4.LZ4" + impl + "FastDecompressor"); - } else { - fastDecompressor = LZ4JavaSafeFastDecompressor.INSTANCE; - } + fastDecompressor = classInstance("net.jpountz.lz4.LZ4" + impl + "FastDecompressor"); safeDecompressor = classInstance("net.jpountz.lz4.LZ4" + impl + "SafeDecompressor"); Constructor highConstructor = highCompressor.getClass().getDeclaredConstructor(int.class); highCompressors[DEFAULT_COMPRESSION_LEVEL] = highCompressor; diff --git a/src/test/net/jpountz/lz4/LZ4FactoryTest.java b/src/test/net/jpountz/lz4/LZ4FactoryTest.java index 77d1ebf..2f2c55c 100644 --- a/src/test/net/jpountz/lz4/LZ4FactoryTest.java +++ b/src/test/net/jpountz/lz4/LZ4FactoryTest.java @@ -32,9 +32,6 @@ public class LZ4FactoryTest extends TestCase { assertEquals(LZ4JNIFastDecompressor.INSTANCE, LZ4Factory.nativeInsecureInstance().fastDecompressor()); assertEquals(LZ4JavaUnsafeFastDecompressor.INSTANCE, LZ4Factory.unsafeInsecureInstance().fastDecompressor()); - assertEquals(LZ4JavaSafeFastDecompressor.INSTANCE, LZ4Factory.nativeInstance().fastDecompressor()); - assertEquals(LZ4JavaSafeFastDecompressor.INSTANCE, LZ4Factory.unsafeInstance().fastDecompressor()); - assertEquals(LZ4JavaSafeFastDecompressor.INSTANCE, LZ4Factory.safeInstance().fastDecompressor()); assertEquals(LZ4JNISafeDecompressor.INSTANCE, LZ4Factory.nativeInstance().safeDecompressor()); assertEquals(LZ4JavaSafeSafeDecompressor.INSTANCE, LZ4Factory.unsafeInstance().safeDecompressor()); -- 2.52.0