Skip to content

Commit 228703f

Browse files
committed
Merge pull request #21365 from izeye
* pr/21365: Fix JarFileTests.getInputStreamWhenClosed() Closes gh-21365
2 parents 846db61 + 665a127 commit 228703f

File tree

1 file changed

+2
-1
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ void getInputStream() throws Exception {
193193

194194
@Test
195195
void getInputStreamWhenClosed() throws Exception {
196+
ZipEntry entry = this.jarFile.getEntry("1.dat");
196197
this.jarFile.close();
197-
assertThatZipFileClosedIsThrownBy(() -> this.jarFile.getInputStream(this.jarFile.getEntry("1.dat")));
198+
assertThatZipFileClosedIsThrownBy(() -> this.jarFile.getInputStream(entry));
198199
}
199200

200201
@Test

0 commit comments

Comments
 (0)