From 915eaf34475f001fd046c49c0454b3e9bed73890 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 23 Feb 2018 17:30:10 +0000 Subject: [PATCH] Polish --- .../org/springframework/boot/loader/jar/JarFileTests.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java index 531ce35696..e4466b8b47 100644 --- a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java +++ b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java @@ -170,9 +170,13 @@ public class JarFileTests { @Test public void getSize() throws Exception { - try (ZipFile zip = new ZipFile(this.rootJarFile)) { + ZipFile zip = new ZipFile(this.rootJarFile); + try { assertThat(this.jarFile.size()).isEqualTo(zip.size()); } + finally { + zip.close(); + } } @Test