Fix JarFileTests.getInputStreamWhenClosed()

See gh-21365
This commit is contained in:
Johnny Lim
2020-05-08 22:56:42 +09:00
committed by Stephane Nicoll
parent 846db6105f
commit 665a127448

View File

@@ -193,8 +193,9 @@ class JarFileTests {
@Test
void getInputStreamWhenClosed() throws Exception {
ZipEntry entry = this.jarFile.getEntry("1.dat");
this.jarFile.close();
assertThatZipFileClosedIsThrownBy(() -> this.jarFile.getInputStream(this.jarFile.getEntry("1.dat")));
assertThatZipFileClosedIsThrownBy(() -> this.jarFile.getInputStream(entry));
}
@Test