From 8108b556adec51c730eea88381d8396af4847ad9 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sun, 13 Oct 2019 13:41:50 +0200 Subject: [PATCH] Fix resource cleanup in test Closes gh-18569 --- .../boot/loader/archive/JarFileArchiveTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java index a7f4e1a8ff..6c5baf437c 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java @@ -178,6 +178,8 @@ class JarFileArchiveTests { assertThat(it.hasNext()).as(i + "nth file is present").isTrue(); it.next(); } + ((JarFileArchive) nestedArchive).close(); + jarFileArchive.close(); } private byte[] writeZip64Jar() throws IOException {