Skip to content

Commit bc329b5

Browse files
committed
Merge pull request #52869 from zhoubiao188
Closes gh-52869 * pr/52869: Close the JMX password file stream in StopMojo#readPassword
2 parents ee0e231 + 13351d3 commit bc329b5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven

‎build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ private String readPassword() {
8686
try (FileInputStream input = new FileInputStream(
8787
new File(this.buildDirectory, "org.springframework.boot.jmxremote.password"))) {
8888
Properties properties = new Properties();
89-
properties.load(
90-
new FileInputStream(new File(this.buildDirectory, "org.springframework.boot.jmxremote.password")));
89+
properties.load(input);
9190
return properties.getProperty("maven-build");
9291
}
9392
catch (IOException ex) {

0 commit comments

Comments
 (0)