Skip to content

Commit 2780f18

Browse files
committed
Remove unused exception
1 parent 2599cba commit 2780f18

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/test/java/org/apache/commons/io/channels/FileChannelsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ enum FileChannelType {
5959
private static final String CONTENT = StringUtils.repeat("x", SMALL_BUFFER_SIZE);
6060

6161
@SuppressWarnings("resource") // Caller closes
62-
private static FileChannel getChannel(final FileInputStream inNotEmpty, final FileChannelType fileChannelType, final int readSize) throws IOException {
62+
private static FileChannel getChannel(final FileInputStream inNotEmpty, final FileChannelType fileChannelType, final int readSize) {
6363
return wrap(inNotEmpty.getChannel(), fileChannelType, readSize);
6464
}
6565

@@ -84,7 +84,7 @@ private static byte reverse(final byte b) {
8484
return (byte) (~b & 0xff);
8585
}
8686

87-
private static FileChannel wrap(final FileChannel fc, final FileChannelType fileChannelType, final int readSize) throws IOException {
87+
private static FileChannel wrap(final FileChannel fc, final FileChannelType fileChannelType, final int readSize) {
8888
switch (fileChannelType) {
8989
case NON_BLOCKING:
9090
return new NonBlockingFileChannelProxy(fc);

src/test/java/org/apache/commons/io/function/IOIterableTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ void testIterator() throws IOException {
7777
}
7878

7979
@Test
80-
void testSpliterator() throws IOException {
80+
void testSpliterator() {
8181
final AtomicInteger ref = new AtomicInteger();
8282
iterable.spliterator().forEachRemaining(e -> ref.incrementAndGet());
8383
assertEquals(2, ref.get());
8484
}
8585

8686
@Test
87-
void testUnrwap() throws IOException {
87+
void testUnrwap() {
8888
assertSame(fixture.list, iterable.unwrap());
8989
assertSame(fixture.unwrap(), iterable.unwrap());
9090
}

src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ private int writeByte(final AbstractByteArrayOutputStream<?> baout, final java.i
504504
return count;
505505
}
506506

507-
private int writeByte(final AbstractByteArrayOutputStream<?> baout, final java.io.ByteArrayOutputStream ref, final int[] instructions) throws IOException {
507+
private int writeByte(final AbstractByteArrayOutputStream<?> baout, final java.io.ByteArrayOutputStream ref, final int[] instructions) {
508508
int written = 0;
509509
for (final int instruction : instructions) {
510510
written += writeByte(baout, ref, instruction);

src/test/java/org/apache/commons/io/output/RandomAccessFileOutputStreamTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void testWriteGet() throws IOException {
134134
}
135135

136136
@Test
137-
void testWriteGetDefault() throws IOException {
137+
void testWriteGetDefault() {
138138
assertThrows(IllegalStateException.class, () -> {
139139
try (RandomAccessFileOutputStream os = RandomAccessFileOutputStream.builder().get()) {
140140
validateState(os);

src/test/java/org/apache/commons/io/output/ThresholdingOutputStreamTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void testResetByteCount() throws IOException {
7272
}
7373

7474
@Test
75-
void testResetByteCountBrokenOutputStream() throws IOException {
75+
void testResetByteCountBrokenOutputStream() {
7676
final int threshold = 1;
7777
final AtomicInteger counter = new AtomicInteger();
7878
final IOException e = assertThrows(IOException.class, () -> {

0 commit comments

Comments
 (0)