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 992b3cf80 Reuse NIO API instead of custom code
992b3cf80 is described below

commit 992b3cf80dce3499f471fddde11672c14d66b5cd
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Nov 14 14:07:01 2023 -0500

    Reuse NIO API instead of custom code
---
 .../java/org/apache/commons/compress/archivers/zip/ZipFileTest.java  | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java 
b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
index bfadce4de..14bf5e9a1 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
@@ -241,10 +241,7 @@ public class ZipFileTest extends AbstractTest {
 
     @Test
     public void testCDOrderInMemory() throws Exception {
-        byte[] data;
-        try (InputStream fis = newInputStream("ordertest.zip")) {
-            data = IOUtils.toByteArray(fis);
-        }
+        final byte[] data = Files.readAllBytes(getPath("ordertest.zip"));
 
         try (SeekableInMemoryByteChannel channel = new 
SeekableInMemoryByteChannel(data)) {
             zf = new ZipFile(channel, CharsetNames.UTF_8);

Reply via email to