You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/11/28 13:06:08 UTC
(commons-compress) 02/03: Address compiler warnings
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
commit 580753936eb0c343b05b0fb98d3d0a8fadd0b57c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Nov 28 08:04:09 2023 -0500
Address compiler warnings
---
.../commons/compress/archivers/tar/TarArchiveInputStreamTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
index d8a518b9d..884d6e060 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
@@ -19,6 +19,7 @@ package org.apache.commons.compress.archivers.tar;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNotSame;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
@@ -41,7 +42,6 @@ import java.util.TimeZone;
import java.util.zip.GZIPInputStream;
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.archivers.ArchiveStreamFactory;
import org.apache.commons.compress.utils.CharsetNames;
@@ -206,7 +206,7 @@ public class TarArchiveInputStreamTest extends AbstractTest {
final byte[] buf = new byte[2];
try (InputStream in = newInputStream("bla.tar");
TarArchiveInputStream archive = new TarArchiveInputStream(in)) {
- final ArchiveEntry e = archive.getNextEntry();
+ assertNotNull(archive.getNextEntry());
IOUtils.toByteArray(archive);
assertEquals(-1, archive.read(buf));
assertEquals(-1, archive.read(buf));
@@ -365,7 +365,7 @@ public class TarArchiveInputStreamTest extends AbstractTest {
public void testSingleByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
try (InputStream in = newInputStream("bla.tar");
TarArchiveInputStream archive = new TarArchiveInputStream(in)) {
- final ArchiveEntry e = archive.getNextEntry();
+ assertNotNull(archive.getNextEntry());
IOUtils.toByteArray(archive);
assertEquals(-1, archive.read());
assertEquals(-1, archive.read());