Merge pull request #21365 from izeye

* pr/21365:
  Fix JarFileTests.getInputStreamWhenClosed()

Closes gh-21365
This commit is contained in:
Stephane Nicoll
2020-05-08 16:07:05 +02:00

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