Browse Source

Merge pull request #21365 from izeye

* pr/21365:
  Fix JarFileTests.getInputStreamWhenClosed()

Closes gh-21365
pull/21134/head
Stephane Nicoll 6 years ago
parent
commit
228703faed
  1. 3
      spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java

3
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java

@ -193,8 +193,9 @@ class JarFileTests { @@ -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

Loading…
Cancel
Save