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 fb07222da Address compiler warnings
fb07222da is described below

commit fb07222da055ee90bba8369c3c3ccb6fc8ea5876
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Nov 28 07:55:23 2023 -0500

    Address compiler warnings
---
 .../compress/archivers/dump/DumpArchiveInputStreamTest.java        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
 
b/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
index 4b4c2396a..d04e832e5 100644
--- 
a/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
+++ 
b/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
@@ -21,19 +21,20 @@ package org.apache.commons.compress.archivers.dump;
 import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.InputStream;
 
 import org.apache.commons.compress.AbstractTest;
-import org.apache.commons.compress.archivers.ArchiveEntry;
 import org.apache.commons.compress.archivers.ArchiveException;
 import org.apache.commons.compress.utils.IOUtils;
 import org.junit.jupiter.api.Test;
 
 public class DumpArchiveInputStreamTest extends AbstractTest {
 
+    @SuppressWarnings("deprecation")
     @Test
     public void testConsumesArchiveCompletely() throws Exception {
         try (InputStream is = 
DumpArchiveInputStreamTest.class.getResourceAsStream("/archive_with_trailer.dump");
@@ -53,7 +54,7 @@ public class DumpArchiveInputStreamTest extends AbstractTest {
         final byte[] buf = new byte[2];
         try (InputStream in = newInputStream("bla.dump");
                 DumpArchiveInputStream archive = new 
DumpArchiveInputStream(in)) {
-            final ArchiveEntry e = archive.getNextEntry();
+            assertNotNull(archive.getNextEntry());
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read(buf));
             assertEquals(-1, archive.read(buf));
@@ -80,7 +81,7 @@ public class DumpArchiveInputStreamTest extends AbstractTest {
     public void testSingleByteReadConsistentlyReturnsMinusOneAtEof() throws 
Exception {
         try (InputStream in = newInputStream("bla.dump");
                 DumpArchiveInputStream archive = new 
DumpArchiveInputStream(in)) {
-            final ArchiveEntry e = archive.getNextEntry();
+            assertNotNull(archive.getNextEntry());
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read());
             assertEquals(-1, archive.read());

Reply via email to