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 d1a5ff9e Exception clean up in tests
d1a5ff9e is described below
commit d1a5ff9eef85e6ddfc5a34db145cbce84885244f
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Dec 10 12:33:26 2022 -0500
Exception clean up in tests
---
.../apache/commons/compress/DetectArchiverTestCase.java | 2 +-
.../compress/archivers/ArchiveServiceLoaderTest.java | 2 +-
.../org/apache/commons/compress/archivers/ZipTestCase.java | 4 ++--
.../commons/compress/archivers/examples/ExpanderTest.java | 6 +++---
.../compress/archivers/examples/SevenZArchiverTest.java | 4 ++--
.../commons/compress/archivers/sevenz/SevenZFileTest.java | 2 +-
.../compress/archivers/tar/TarArchiveEntryTest.java | 2 +-
.../apache/commons/compress/archivers/tar/TarFileTest.java | 8 ++++----
.../compress/archivers/zip/Maven221MultiVolumeTest.java | 2 +-
.../compress/archivers/zip/ZipSplitOutputStreamTest.java | 4 ++--
.../compress/compressors/CompressorServiceLoaderTest.java | 4 ++--
.../compressors/bzip2/PythonTruncatedBzip2Test.java | 2 +-
.../lz4/FramedLZ4CompressorInputStreamTest.java | 8 ++++----
.../lz77support/AbstractLZ77CompressorInputStreamTest.java | 3 ++-
.../compress/harmony/unpack200/tests/BcBandsTest.java | 4 ++--
.../org/apache/commons/compress/utils/ByteUtilsTest.java | 12 ++++++------
.../compress/utils/ChecksumVerifyingInputStreamTest.java | 4 ++--
.../org/apache/commons/compress/utils/IOUtilsTest.java | 6 +++---
.../compress/utils/SeekableInMemoryByteChannelTest.java | 6 +++---
.../utils/ZipSplitReadOnlySeekableByteChannelTest.java | 14 +++++++-------
20 files changed, 50 insertions(+), 49 deletions(-)
diff --git
a/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java
b/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java
index 6d616ff3..b5c48b6a 100644
--- a/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java
+++ b/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java
@@ -42,7 +42,7 @@ public final class DetectArchiverTestCase extends
AbstractTestCase {
final ClassLoader classLoader = getClass().getClassLoader();
@Test
- public void testDetectionNotArchive() throws IOException {
+ public void testDetectionNotArchive() {
assertThrows(ArchiveException.class, () -> getStreamFor("test.txt"));
}
diff --git
a/src/test/java/org/apache/commons/compress/archivers/ArchiveServiceLoaderTest.java
b/src/test/java/org/apache/commons/compress/archivers/ArchiveServiceLoaderTest.java
index 9cbe865c..dcfee454 100644
---
a/src/test/java/org/apache/commons/compress/archivers/ArchiveServiceLoaderTest.java
+++
b/src/test/java/org/apache/commons/compress/archivers/ArchiveServiceLoaderTest.java
@@ -35,7 +35,7 @@ public class ArchiveServiceLoaderTest {
}
@Test
- public void testOutputStream() throws ArchiveException {
+ public void testOutputStream() {
assertThrows(ArchiveException.class, () ->
ArchiveStreamFactory.DEFAULT.createArchiveOutputStream("ArchiveTestOutput1",
new ByteArrayOutputStream()));
}
diff --git
a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
index 3710bf90..59feaccb 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
@@ -690,12 +690,12 @@ public final class ZipTestCase extends AbstractTestCase {
}
@Test
- public void buildSplitZipWithTooSmallSizeThrowsException() throws
IOException {
+ public void buildSplitZipWithTooSmallSizeThrowsException() {
assertThrows(IllegalArgumentException.class, () -> new
ZipArchiveOutputStream(File.createTempFile("temp", "zip"), 64 * 1024 - 1));
}
@Test
- public void buildSplitZipWithTooLargeSizeThrowsException() throws
IOException {
+ public void buildSplitZipWithTooLargeSizeThrowsException() {
assertThrows(IllegalArgumentException.class, () -> new
ZipArchiveOutputStream(File.createTempFile("temp", "zip"), 4294967295L + 1));
}
diff --git
a/src/test/java/org/apache/commons/compress/archivers/examples/ExpanderTest.java
b/src/test/java/org/apache/commons/compress/archivers/examples/ExpanderTest.java
index 31c22bef..eba28694 100644
---
a/src/test/java/org/apache/commons/compress/archivers/examples/ExpanderTest.java
+++
b/src/test/java/org/apache/commons/compress/archivers/examples/ExpanderTest.java
@@ -64,7 +64,7 @@ public class ExpanderTest extends AbstractTestCase {
}
@Test
- public void sevenZInputStreamVersion() throws IOException,
ArchiveException {
+ public void sevenZInputStreamVersion() throws IOException {
setup7z();
try (InputStream i = new
BufferedInputStream(Files.newInputStream(archive.toPath()))) {
assertThrows(StreamingNotSupportedException.class, () -> new
Expander().expand("7z", i, resultDir));
@@ -72,7 +72,7 @@ public class ExpanderTest extends AbstractTestCase {
}
@Test
- public void sevenZInputStreamVersionWithAutoDetection() throws
IOException, ArchiveException {
+ public void sevenZInputStreamVersionWithAutoDetection() throws IOException
{
setup7z();
try (InputStream i = new
BufferedInputStream(Files.newInputStream(archive.toPath()))) {
assertThrows(StreamingNotSupportedException.class, () -> new
Expander().expand(i, resultDir));
@@ -89,7 +89,7 @@ public class ExpanderTest extends AbstractTestCase {
}
@Test
- public void sevenZFileVersion() throws IOException, ArchiveException {
+ public void sevenZFileVersion() throws IOException {
setup7z();
try (SevenZFile f = new SevenZFile(archive)) {
new Expander().expand(f, resultDir);
diff --git
a/src/test/java/org/apache/commons/compress/archivers/examples/SevenZArchiverTest.java
b/src/test/java/org/apache/commons/compress/archivers/examples/SevenZArchiverTest.java
index 162ace51..ffb5896f 100644
---
a/src/test/java/org/apache/commons/compress/archivers/examples/SevenZArchiverTest.java
+++
b/src/test/java/org/apache/commons/compress/archivers/examples/SevenZArchiverTest.java
@@ -64,7 +64,7 @@ public class SevenZArchiverTest extends AbstractTestCase {
}
@Test
- public void outputStreamVersion() throws IOException, ArchiveException {
+ public void outputStreamVersion() throws IOException {
try (OutputStream os = Files.newOutputStream(target.toPath())) {
assertThrows(StreamingNotSupportedException.class, () -> new
Archiver().create("7z", os, dir));
}
@@ -81,7 +81,7 @@ public class SevenZArchiverTest extends AbstractTestCase {
// not really a 7z test but I didn't feel like adding a new test just for
this
@Test
- public void unknownFormat() throws IOException, ArchiveException {
+ public void unknownFormat() throws IOException {
try (SeekableByteChannel c = FileChannel.open(target.toPath(),
StandardOpenOption.WRITE, StandardOpenOption.CREATE,
StandardOpenOption.TRUNCATE_EXISTING)) {
assertThrows(ArchiveException.class, () -> new
Archiver().create("unknown format", c, dir));
diff --git
a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
index 839de985..74ed971a 100644
---
a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
+++
b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
@@ -316,7 +316,7 @@ public class SevenZFileTest extends AbstractTestCase {
}
@Test
- public void limitExtractionMemory() throws IOException {
+ public void limitExtractionMemory() {
assertThrows(MemoryLimitException.class, () -> {
try (SevenZFile sevenZFile = new SevenZFile(getFile("bla.7z"),
SevenZFileOptions.builder().withMaxMemoryLimitInKb(1).build())) {
// Do nothing. Exception should be thrown
diff --git
a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java
b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java
index 7d870ff1..a2a429dd 100644
---
a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java
+++
b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java
@@ -241,7 +241,7 @@ public class TarArchiveEntryTest implements TarConstants {
}
@Test
- public void negativeOffsetInConstructorNotAllowed() throws IOException {
+ public void negativeOffsetInConstructorNotAllowed() {
// @formatter:off
byte[] entryContent =
("test1.xml\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
+
"\u0000" +
diff --git
a/src/test/java/org/apache/commons/compress/archivers/tar/TarFileTest.java
b/src/test/java/org/apache/commons/compress/archivers/tar/TarFileTest.java
index 5e7e85d4..bd35b4fe 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarFileTest.java
@@ -288,12 +288,12 @@ public class TarFileTest extends AbstractTestCase {
}
@Test
- public void testParseTarWithSpecialPaxHeaders() throws IOException {
+ public void testParseTarWithSpecialPaxHeaders() {
assertThrows(IOException.class, () -> new
TarFile(getPath("COMPRESS-530.tar")));
}
@Test
- public void testParseTarWithNonNumberPaxHeaders() throws IOException {
+ public void testParseTarWithNonNumberPaxHeaders() {
assertThrows(IOException.class, () -> new
TarFile(getPath("COMPRESS-529.tar")));
}
@@ -308,12 +308,12 @@ public class TarFileTest extends AbstractTestCase {
}
@Test
- public void testThrowExceptionWithNullEntry() throws IOException {
+ public void testThrowExceptionWithNullEntry() {
assertThrows(IOException.class, () -> new
TarFile(getPath("COMPRESS-554.tar")));
}
@Test
- public void testThrowException() throws IOException {
+ public void testThrowException() {
assertThrows(IOException.class, () -> new
TarFile(getPath("COMPRESS-553.tar")));
}
diff --git
a/src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
b/src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
index cfca6884..011b9c83 100644
---
a/src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
+++
b/src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
@@ -118,7 +118,7 @@ public class Maven221MultiVolumeTest {
}
@Test
- public void testRead7ZipMultiVolumeArchiveForFile() throws IOException {
+ public void testRead7ZipMultiVolumeArchiveForFile() {
assertThrows(IOException.class, () -> new
ZipFile(getFile("apache-maven-2.2.1.zip.001")));
}
}
diff --git
a/src/test/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStreamTest.java
b/src/test/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStreamTest.java
index e62a1049..64355181 100644
---
a/src/test/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStreamTest.java
+++
b/src/test/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStreamTest.java
@@ -32,12 +32,12 @@ import org.junit.jupiter.api.Test;
public class ZipSplitOutputStreamTest extends AbstractTestCase {
@Test
- public void throwsExceptionIfSplitSizeIsTooSmall() throws IOException {
+ public void throwsExceptionIfSplitSizeIsTooSmall() {
assertThrows(IllegalArgumentException.class, () -> new
ZipSplitOutputStream(File.createTempFile("temp", "zip"), (64 * 1024 - 1)));
}
@Test
- public void throwsExceptionIfSplitSizeIsTooLarge() throws IOException {
+ public void throwsExceptionIfSplitSizeIsTooLarge() {
assertThrows(IllegalArgumentException.class, () -> new
ZipSplitOutputStream(File.createTempFile("temp", "zip"), (4 * 1024 * 1024 *
1024L)));
}
diff --git
a/src/test/java/org/apache/commons/compress/compressors/CompressorServiceLoaderTest.java
b/src/test/java/org/apache/commons/compress/compressors/CompressorServiceLoaderTest.java
index 72d4f207..ab471f00 100644
---
a/src/test/java/org/apache/commons/compress/compressors/CompressorServiceLoaderTest.java
+++
b/src/test/java/org/apache/commons/compress/compressors/CompressorServiceLoaderTest.java
@@ -31,13 +31,13 @@ import org.junit.jupiter.api.Test;
public class CompressorServiceLoaderTest {
@Test
- public void testInputStream() throws CompressorException {
+ public void testInputStream() {
assertThrows(InvocationConfirmationException.class,
() -> new
CompressorStreamFactory().createCompressorInputStream("TestInput1", new
ByteArrayInputStream(ArrayUtils.EMPTY_BYTE_ARRAY)));
}
@Test
- public void testOutputStream() throws CompressorException {
+ public void testOutputStream() {
assertThrows(InvocationConfirmationException.class,
() -> new
CompressorStreamFactory().createCompressorOutputStream("TestOutput1", new
ByteArrayOutputStream()));
}
diff --git
a/src/test/java/org/apache/commons/compress/compressors/bzip2/PythonTruncatedBzip2Test.java
b/src/test/java/org/apache/commons/compress/compressors/bzip2/PythonTruncatedBzip2Test.java
index 61c50442..0211822f 100644
---
a/src/test/java/org/apache/commons/compress/compressors/bzip2/PythonTruncatedBzip2Test.java
+++
b/src/test/java/org/apache/commons/compress/compressors/bzip2/PythonTruncatedBzip2Test.java
@@ -73,7 +73,7 @@ public class PythonTruncatedBzip2Test {
}
@Test
- public void testTruncatedData() throws IOException {
+ public void testTruncatedData() {
// with BZ2File(self.filename) as f:
// self.assertRaises(EOFError, f.read)
System.out.println("Attempt to read the whole thing in, should throw
...");
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 cf83c253..a0a1eaa3 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
@@ -152,7 +152,7 @@ public final class FramedLZ4CompressorInputStreamTest
extends AbstractTestCase {
}
@Test
- public void rejectsNonLZ4Stream() throws IOException {
+ public void rejectsNonLZ4Stream() {
assertThrows(IOException.class, () -> new
FramedLZ4CompressorInputStream(Files.newInputStream(getFile("bla.tar").toPath())));
}
@@ -590,17 +590,17 @@ public final class FramedLZ4CompressorInputStreamTest
extends AbstractTestCase {
}
@Test
- public void backreferenceOfSize0CausesIOException() throws IOException {
+ public void backreferenceOfSize0CausesIOException() {
expectIOException("COMPRESS-490/ArithmeticException.lz4");
}
@Test
- public void backreferenceAtStartCausesIOException() throws IOException {
+ public void backreferenceAtStartCausesIOException() {
expectIOException("COMPRESS-490/ArrayIndexOutOfBoundsException1.lz4");
}
@Test
- public void backreferenceWithOffsetTooBigCausesIOException() throws
IOException {
+ public void backreferenceWithOffsetTooBigCausesIOException() {
expectIOException("COMPRESS-490/ArrayIndexOutOfBoundsException2.lz4");
}
diff --git
a/src/test/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStreamTest.java
b/src/test/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStreamTest.java
index 72f2bf71..85b484d2 100644
---
a/src/test/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStreamTest.java
+++
b/src/test/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStreamTest.java
@@ -34,7 +34,8 @@ public class AbstractLZ77CompressorInputStreamTest {
private static class TestStream extends AbstractLZ77CompressorInputStream {
private boolean literal;
- TestStream(final InputStream in) throws IOException {
+
+ TestStream(final InputStream in) {
super(in, 1024);
}
diff --git
a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BcBandsTest.java
b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BcBandsTest.java
index 72e3a5b3..37131a51 100644
---
a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BcBandsTest.java
+++
b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BcBandsTest.java
@@ -688,11 +688,11 @@ public class BcBandsTest extends AbstractBandsTestCase {
assertEquals(3, bc_initrefref.length);
}
- public void testBcEscRefBands() throws IOException, Pack200Exception {
+ public void testBcEscRefBands() {
// TODO
}
- public void testBcEscBands() throws IOException, Pack200Exception {
+ public void testBcEscBands() {
// TODO
}
diff --git a/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
b/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
index de85f8b3..36dbeecd 100644
--- a/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
@@ -87,12 +87,12 @@ public class ByteUtilsTest {
}
@Test
- public void fromLittleEndianFromStreamThrowsForLengthTooBig() throws
IOException {
+ public void fromLittleEndianFromStreamThrowsForLengthTooBig() {
assertThrows(IllegalArgumentException.class, () ->
fromLittleEndian(new ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY), 9));
}
@Test
- public void fromLittleEndianFromStreamThrowsForPrematureEnd() throws
IOException {
+ public void fromLittleEndianFromStreamThrowsForPrematureEnd() {
final ByteArrayInputStream bin = new ByteArrayInputStream(new byte[] {
2, 3 });
assertThrows(IOException.class, () -> fromLittleEndian(bin, 3));
}
@@ -111,12 +111,12 @@ public class ByteUtilsTest {
}
@Test
- public void fromLittleEndianFromSupplierThrowsForLengthTooBig() throws
IOException {
+ public void fromLittleEndianFromSupplierThrowsForLengthTooBig() {
assertThrows(IllegalArgumentException.class, () ->
fromLittleEndian(new InputStreamByteSupplier(new
ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY)), 9));
}
@Test
- public void fromLittleEndianFromSupplierThrowsForPrematureEnd() throws
IOException {
+ public void fromLittleEndianFromSupplierThrowsForPrematureEnd() {
final ByteArrayInputStream bin = new ByteArrayInputStream(new byte[] {
2, 3 });
assertThrows(IOException.class, () -> fromLittleEndian(new
InputStreamByteSupplier(bin), 3));
}
@@ -134,13 +134,13 @@ public class ByteUtilsTest {
}
@Test
- public void fromLittleEndianFromDataInputThrowsForLengthTooBig() throws
IOException {
+ public void fromLittleEndianFromDataInputThrowsForLengthTooBig() {
final DataInput din = new DataInputStream(new
ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY));
assertThrows(IllegalArgumentException.class, () ->
fromLittleEndian(din, 9));
}
@Test
- public void fromLittleEndianFromDataInputThrowsForPrematureEnd() throws
IOException {
+ public void fromLittleEndianFromDataInputThrowsForPrematureEnd() {
final DataInput din = new DataInputStream(new ByteArrayInputStream(new
byte[] { 2, 3 }));
assertThrows(EOFException.class, () -> fromLittleEndian(din, 3));
}
diff --git
a/src/test/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStreamTest.java
b/src/test/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStreamTest.java
index efaeb2cd..58ceaeb3 100644
---
a/src/test/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStreamTest.java
+++
b/src/test/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStreamTest.java
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
public class ChecksumVerifyingInputStreamTest {
@Test
- public void testReadTakingByteArrayThrowsIOException() throws IOException {
+ public void testReadTakingByteArrayThrowsIOException() {
final Adler32 adler32 = new Adler32();
final byte[] byteArray = new byte[3];
final ByteArrayInputStream byteArrayInputStream = new
ByteArrayInputStream(byteArray);
@@ -45,7 +45,7 @@ public class ChecksumVerifyingInputStreamTest {
}
@Test
- public void testReadTakingNoArgumentsThrowsIOException() throws
IOException {
+ public void testReadTakingNoArgumentsThrowsIOException() {
final CRC32 cRC32_ = new CRC32();
final byte[] byteArray = new byte[9];
final ByteArrayInputStream byteArrayInputStream = new
ByteArrayInputStream(byteArray);
diff --git a/src/test/java/org/apache/commons/compress/utils/IOUtilsTest.java
b/src/test/java/org/apache/commons/compress/utils/IOUtilsTest.java
index 2ada639a..1ee65539 100644
--- a/src/test/java/org/apache/commons/compress/utils/IOUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/utils/IOUtilsTest.java
@@ -81,7 +81,7 @@ public class IOUtilsTest {
}
@Test
- public void readFullyOnChannelThrowsEof() throws IOException {
+ public void readFullyOnChannelThrowsEof() {
final ByteBuffer b = ByteBuffer.allocate(21);
final byte[] source = new byte[20];
for (byte i = 0; i < 20; i++) {
@@ -91,12 +91,12 @@ public class IOUtilsTest {
}
@Test
- public void copyThrowsOnZeroBufferSize() throws IOException {
+ public void copyThrowsOnZeroBufferSize() {
assertThrows(IllegalArgumentException.class, () -> IOUtils.copy(new
ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY), new ByteArrayOutputStream(),
0));
}
@Test
- public void copyRangeThrowsOnZeroBufferSize() throws IOException {
+ public void copyRangeThrowsOnZeroBufferSize() {
assertThrows(IllegalArgumentException.class,
() -> IOUtils.copyRange(new
ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY), 5, new
ByteArrayOutputStream(), 0));
}
diff --git
a/src/test/java/org/apache/commons/compress/utils/SeekableInMemoryByteChannelTest.java
b/src/test/java/org/apache/commons/compress/utils/SeekableInMemoryByteChannelTest.java
index 821dadea..86c30d66 100644
---
a/src/test/java/org/apache/commons/compress/utils/SeekableInMemoryByteChannelTest.java
+++
b/src/test/java/org/apache/commons/compress/utils/SeekableInMemoryByteChannelTest.java
@@ -96,7 +96,7 @@ public class SeekableInMemoryByteChannelTest {
}
@Test
- public void shouldThrowExceptionOnReadingClosedChannel() throws
IOException {
+ public void shouldThrowExceptionOnReadingClosedChannel() {
//given
final SeekableInMemoryByteChannel c = new
SeekableInMemoryByteChannel();
//when
@@ -137,7 +137,7 @@ public class SeekableInMemoryByteChannelTest {
@Test
- public void shouldThrowExceptionOnWritingToClosedChannel() throws
IOException {
+ public void shouldThrowExceptionOnWritingToClosedChannel() {
//given
final SeekableInMemoryByteChannel c = new
SeekableInMemoryByteChannel();
//when
@@ -186,7 +186,7 @@ public class SeekableInMemoryByteChannelTest {
}
@Test
- public void shouldThrowExceptionWhenSettingIncorrectPosition() throws
IOException {
+ public void shouldThrowExceptionWhenSettingIncorrectPosition() {
//given
final SeekableInMemoryByteChannel c = new
SeekableInMemoryByteChannel();
//when
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 fff29bb4..d0f9f3a0 100644
---
a/src/test/java/org/apache/commons/compress/utils/ZipSplitReadOnlySeekableByteChannelTest.java
+++
b/src/test/java/org/apache/commons/compress/utils/ZipSplitReadOnlySeekableByteChannelTest.java
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
public class ZipSplitReadOnlySeekableByteChannelTest {
@Test
- public void constructorThrowsOnNullArg() throws IOException {
+ public void constructorThrowsOnNullArg() {
assertThrows(NullPointerException.class, () -> new
ZipSplitReadOnlySeekableByteChannel(null));
}
@@ -61,12 +61,12 @@ public class ZipSplitReadOnlySeekableByteChannelTest {
}
@Test
- public void forOrderedSeekableByteChannelsThrowsOnNullArg() throws
IOException {
+ public void forOrderedSeekableByteChannelsThrowsOnNullArg() {
assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forOrderedSeekableByteChannels(null));
}
@Test
- public void forOrderedSeekableByteChannelsOfTwoParametersThrowsOnNullArg()
throws IOException {
+ public void forOrderedSeekableByteChannelsOfTwoParametersThrowsOnNullArg()
{
assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forOrderedSeekableByteChannels(null, null));
}
@@ -100,12 +100,12 @@ public class ZipSplitReadOnlySeekableByteChannelTest {
}
@Test
- public void forFilesThrowsOnNullArg() throws IOException {
+ public void forFilesThrowsOnNullArg() {
assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forFiles(null));
}
@Test
- public void forFilesOfTwoParametersThrowsOnNullArg() throws IOException {
+ public void forFilesOfTwoParametersThrowsOnNullArg() {
assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forFiles(null, null));
}
@@ -172,12 +172,12 @@ public class ZipSplitReadOnlySeekableByteChannelTest {
}
@Test
- public void forPathsThrowsOnNullArg() throws IOException {
+ public void forPathsThrowsOnNullArg() {
assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forPaths(null));
}
@Test
- public void forPathsOfTwoParametersThrowsOnNullArg() throws IOException {
+ public void forPathsOfTwoParametersThrowsOnNullArg() {
assertThrows(NullPointerException.class, () ->
ZipSplitReadOnlySeekableByteChannel.forPaths(null, null));
}