File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
buildSrc/src/test/java/io/spring/gradle/convention Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,13 @@ public void buildTriggersDocs() throws Exception {
35
35
assertThat (result .task (":docs" ).getOutcome ()).isEqualTo (SUCCESS );
36
36
assertThat (result .task (":docsZip" ).getOutcome ()).isEqualTo (SUCCESS );
37
37
File zip = new File (testKit .getRootDir (), "build/distributions/simple-1.0.0.BUILD-SNAPSHOT-docs.zip" );
38
- List <? extends ZipEntry > entries = Collections .list (new ZipFile (zip ).entries ());
39
- assertThat (entries )
40
- .extracting (ZipEntry ::getName )
41
- .contains ("docs/reference/html5/index.html" )
42
- .contains ("docs/reference/pdf/simple-reference.pdf" );
38
+ try (ZipFile file = new ZipFile (zip )) {
39
+ List <? extends ZipEntry > entries = Collections .list (file .entries ());
40
+ assertThat (entries )
41
+ .extracting (ZipEntry ::getName )
42
+ .contains ("docs/reference/html5/index.html" )
43
+ .contains ("docs/reference/pdf/simple-reference.pdf" );
44
+ }
43
45
}
44
46
45
47
@ Test
You can’t perform that action at this time.
0 commit comments