Skip to content

Commit 9cced06

Browse files
committed
Delete argfile on JVM exit
Closes gh-42841
1 parent e4adc7d commit 9cced06

File tree

1 file changed

+3
-1
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven

1 file changed

+3
-1
lines changed

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,9 @@ private String escape(CharSequence content) {
477477
}
478478

479479
static ArgFile create(CharSequence content) throws IOException {
480-
ArgFile argFile = new ArgFile(Files.createTempFile("spring-boot-", ".argfile"));
480+
Path tempFile = Files.createTempFile("spring-boot-", ".argfile");
481+
tempFile.toFile().deleteOnExit();
482+
ArgFile argFile = new ArgFile(tempFile);
481483
argFile.write(content);
482484
return argFile;
483485
}

0 commit comments

Comments
 (0)