Skip to content

Commit 77089a1

Browse files
committed
Merge branch '3.3.x'
Closes spring-projectsgh-41908
2 parents b6d648e + cca5516 commit 77089a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/AbstractLoggingSystemTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
package org.springframework.boot.logging;
1818

1919
import java.io.File;
20+
import java.io.IOException;
21+
import java.nio.file.Files;
2022
import java.nio.file.Path;
2123
import java.util.Arrays;
2224

@@ -43,8 +45,10 @@ public abstract class AbstractLoggingSystemTests {
4345
private String originalTempDirectory;
4446

4547
@BeforeEach
46-
void configureTempDir(@TempDir Path temp) {
48+
void configureTempDir(@TempDir Path temp) throws IOException {
4749
this.originalTempDirectory = System.getProperty(JAVA_IO_TMPDIR);
50+
Files.delete(Files.createTempFile("prevent", "pollution"));
51+
File.createTempFile("prevent", "pollution").delete();
4852
System.setProperty(JAVA_IO_TMPDIR, temp.toAbsolutePath().toString());
4953
MDC.clear();
5054
}

0 commit comments

Comments
 (0)