This commit is contained in:
Andy Wilkinson 2018-02-23 17:30:10 +00:00
parent 746cc0f70b
commit 915eaf3447

View File

@ -170,9 +170,13 @@ public class JarFileTests {
@Test @Test
public void getSize() throws Exception { 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()); assertThat(this.jarFile.size()).isEqualTo(zip.size());
} }
finally {
zip.close();
}
} }
@Test @Test