Skip to content

Commit a6b2244

Browse files
committed
Prevent test to fail with Java 9
See spring-projectsgh-9529
1 parent 0bdf3c7 commit a6b2244

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ public void setup() throws Exception {
9090
@After
9191
public void cleanup() throws Exception {
9292
this.inputStream.close();
93-
this.file.close();
93+
try {
94+
this.file.close();
95+
}
96+
catch (NullPointerException e) {
97+
// See gh-9529
98+
}
9499
}
95100

96101
@Test

0 commit comments

Comments
 (0)