Skip to content

Commit 0cfaec9

Browse files
committed
The bug fix for [COMPRESS-714] is better done in Commons IO
1 parent 391f90b commit 0cfaec9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/apache/commons/compress/archivers/zip/ZipCompress714Test.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121

2222
import static org.junit.jupiter.api.Assertions.assertThrows;
2323

24-
import java.io.EOFException;
2524
import java.io.IOException;
2625

26+
import org.apache.commons.compress.archivers.ArchiveException;
2727
import org.apache.commons.compress.utils.SeekableInMemoryByteChannel;
2828
import org.junit.jupiter.api.Test;
2929

@@ -35,7 +35,7 @@ public class ZipCompress714Test {
3535
@Test
3636
public void testIllegalPosition() throws IOException {
3737
final byte[] data = { 80, 75, 5, 6, -127, 80, 75, 5, 6, 7, -127, -127, -127, 80, 74, 7, 8, -127, -127, -127, -127, -127 };
38-
assertThrows(EOFException.class, () -> ZipFile.builder().setChannel(new SeekableInMemoryByteChannel(data)).get());
39-
assertThrows(EOFException.class, () -> ZipFile.builder().setByteArray(data).get());
38+
assertThrows(ArchiveException.class, () -> ZipFile.builder().setChannel(new SeekableInMemoryByteChannel(data)).get());
39+
assertThrows(ArchiveException.class, () -> ZipFile.builder().setByteArray(data).get());
4040
}
4141
}

0 commit comments

Comments
 (0)