This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new b71bea4c423 [fix][test] Replace LZ4FastDecompressor with 
LZ4SafeDecompressor in test (#25032)
b71bea4c423 is described below

commit b71bea4c42353f9d14f817aa9a0877d495336f34
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Dec 3 18:04:03 2025 +0100

    [fix][test] Replace LZ4FastDecompressor with LZ4SafeDecompressor in test 
(#25032)
---
 pulsar-common/pom.xml                                          |  4 ++--
 .../pulsar/common/compression/CompressionCodecLZ4JNI.java      | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pulsar-common/pom.xml b/pulsar-common/pom.xml
index 2d308d4525d..5ec00f9125e 100644
--- a/pulsar-common/pom.xml
+++ b/pulsar-common/pom.xml
@@ -254,9 +254,9 @@
     </dependency>
 
     <dependency>
-      <groupId>org.lz4</groupId>
+      <groupId>at.yawk.lz4</groupId>
       <artifactId>lz4-java</artifactId>
-      <version>1.5.0</version>
+      <version>1.9.0</version>
       <scope>test</scope>
     </dependency>
 
diff --git 
a/pulsar-common/src/test/java/org/apache/pulsar/common/compression/CompressionCodecLZ4JNI.java
 
b/pulsar-common/src/test/java/org/apache/pulsar/common/compression/CompressionCodecLZ4JNI.java
index 42b67219e7d..daea2f167f5 100644
--- 
a/pulsar-common/src/test/java/org/apache/pulsar/common/compression/CompressionCodecLZ4JNI.java
+++ 
b/pulsar-common/src/test/java/org/apache/pulsar/common/compression/CompressionCodecLZ4JNI.java
@@ -24,7 +24,7 @@ import java.nio.ByteBuffer;
 import lombok.extern.slf4j.Slf4j;
 import net.jpountz.lz4.LZ4Compressor;
 import net.jpountz.lz4.LZ4Factory;
-import net.jpountz.lz4.LZ4FastDecompressor;
+import net.jpountz.lz4.LZ4SafeDecompressor;
 import org.apache.pulsar.common.allocator.PulsarByteBufAllocator;
 
 /**
@@ -44,7 +44,7 @@ public class CompressionCodecLZ4JNI implements 
CompressionCodec {
 
     private static final LZ4Factory lz4Factory = LZ4Factory.fastestInstance();
     private static final LZ4Compressor compressor = 
lz4Factory.fastCompressor();
-    private static final LZ4FastDecompressor decompressor = 
lz4Factory.fastDecompressor();
+    private static final LZ4SafeDecompressor decompressor = 
lz4Factory.safeDecompressor();
 
     @Override
     public ByteBuf encode(ByteBuf source) {
@@ -67,10 +67,10 @@ public class CompressionCodecLZ4JNI implements 
CompressionCodec {
         ByteBuffer uncompressedNio = uncompressed.nioBuffer(0, 
uncompressedLength);
 
         ByteBuffer encodedNio = encoded.nioBuffer(encoded.readerIndex(), 
encoded.readableBytes());
-        decompressor.decompress(encodedNio, encodedNio.position(), 
uncompressedNio, uncompressedNio.position(),
-                uncompressedNio.remaining());
+        decompressor.decompress(encodedNio, encodedNio.position(), 
encodedNio.remaining(),
+                uncompressedNio, uncompressedNio.position(), 
uncompressedNio.remaining());
 
         uncompressed.writerIndex(uncompressedLength);
         return uncompressed;
     }
-}
\ No newline at end of file
+}

Reply via email to