Skip to content

Commit 9d77720

Browse files
committed
Prevent test to fail with Java 9
See gh-9529
1 parent 2f903c8 commit 9d77720

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
@@ -93,7 +93,12 @@ public void setup() throws Exception {
9393
@After
9494
public void cleanup() throws Exception {
9595
this.inputStream.close();
96-
this.file.close();
96+
try {
97+
this.file.close();
98+
}
99+
catch (NullPointerException e) {
100+
// See gh-9529
101+
}
97102
}
98103

99104
@Test

0 commit comments

Comments
 (0)