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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new b61bf5aea Use NIO
b61bf5aea is described below

commit b61bf5aea551a93c7fd3e8850a03d8f3913558eb
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jan 14 15:56:43 2024 -0500

    Use NIO
---
 .../compressors/lz4/FramedLZ4CompressorInputStreamTest.java      | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
 
b/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
index 3b6a85631..94fdd9918 100644
--- 
a/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
+++ 
b/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
@@ -93,11 +93,10 @@ public final class FramedLZ4CompressorInputStreamTest 
extends AbstractTest {
     @Test
     public void testMatches() throws IOException {
         assertFalse(FramedLZ4CompressorInputStream.matches(new byte[10], 4));
-        final byte[] b = new byte[12];
-        IOUtils.read(getFile("bla.tar.lz4"), b);
-        assertFalse(FramedLZ4CompressorInputStream.matches(b, 3));
-        assertTrue(FramedLZ4CompressorInputStream.matches(b, 4));
-        assertTrue(FramedLZ4CompressorInputStream.matches(b, 5));
+        final byte[] expected = Files.readAllBytes(getPath("bla.tar.lz4"));
+        assertFalse(FramedLZ4CompressorInputStream.matches(expected, 3));
+        assertTrue(FramedLZ4CompressorInputStream.matches(expected, 4));
+        assertTrue(FramedLZ4CompressorInputStream.matches(expected, 5));
     }
 
     @Test

Reply via email to