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 955b322a5 Fix compiler warnings in tests
955b322a5 is described below
commit 955b322a571a2b1673262363a18a9e454782f73a
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Jul 30 08:38:46 2024 -0400
Fix compiler warnings in tests
---
.../compress/utils/MultiReadOnlySeekableByteChannelTest.java | 5 +++--
.../compress/utils/ZipSplitReadOnlySeekableByteChannelTest.java | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git
a/src/test/java/org/apache/commons/compress/utils/MultiReadOnlySeekableByteChannelTest.java
b/src/test/java/org/apache/commons/compress/utils/MultiReadOnlySeekableByteChannelTest.java
index 5ef532444..c03a35379 100644
---
a/src/test/java/org/apache/commons/compress/utils/MultiReadOnlySeekableByteChannelTest.java
+++
b/src/test/java/org/apache/commons/compress/utils/MultiReadOnlySeekableByteChannelTest.java
@@ -25,6 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
@@ -263,7 +264,7 @@ public class MultiReadOnlySeekableByteChannelTest {
@Test
public void testForFilesThrowsOnNullArg() {
- assertThrows(NullPointerException.class, () ->
MultiReadOnlySeekableByteChannel.forFiles(null));
+ assertThrows(NullPointerException.class, () ->
MultiReadOnlySeekableByteChannel.forFiles((File[]) null));
}
@Test
@@ -276,7 +277,7 @@ public class MultiReadOnlySeekableByteChannelTest {
@Test
public void testForSeekableByteChannelsThrowsOnNullArg() {
- assertThrows(NullPointerException.class, () ->
MultiReadOnlySeekableByteChannel.forSeekableByteChannels(null));
+ assertThrows(NullPointerException.class, () ->
MultiReadOnlySeekableByteChannel.forSeekableByteChannels((SeekableByteChannel[])
null));
}
/*
diff --git
a/src/test/java/org/apache/commons/compress/utils/ZipSplitReadOnlySeekableByteChannelTest.java
b/src/test/java/org/apache/commons/compress/utils/ZipSplitReadOnlySeekableByteChannelTest.java
index d1d6f79e6..6ab21ef79 100644
---
a/src/test/java/org/apache/commons/compress/utils/ZipSplitReadOnlySeekableByteChannelTest.java
+++
b/src/test/java/org/apache/commons/compress/utils/ZipSplitReadOnlySeekableByteChannelTest.java
@@ -110,7 +110,7 @@ public class ZipSplitReadOnlySeekableByteChannelTest {
@Test
public void testForFilesThrowsOnNullArg() {
- assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forFiles(null));
+ assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forFiles((File[]) null));
}
@Test
@@ -152,7 +152,7 @@ public class ZipSplitReadOnlySeekableByteChannelTest {
@Test
public void testForOrderedSeekableByteChannelsThrowsOnNullArg() {
- assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forOrderedSeekableByteChannels(null));
+ assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forOrderedSeekableByteChannels((SeekableByteChannel[])
null));
}
@Test
@@ -181,7 +181,7 @@ public class ZipSplitReadOnlySeekableByteChannelTest {
@Test
public void testForPathsThrowsOnNullArg() {
- assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forPaths(null));
+ assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forPaths((Path[]) null));
}
@Test