Skip to content

Commit 2dac97a

Browse files
committed
Merge branch '3.4.x'
Closes gh-44455
2 parents 3d81a8d + 4d137d4 commit 2dac97a

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ssl/pem

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ssl/pem/PemContent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ static PemContent load(String content, ResourceLoader resourceLoader) throws IOE
120120
if (isPresentInText(content)) {
121121
return new PemContent(content);
122122
}
123-
try {
124-
return load(resourceLoader.getResource(content).getInputStream());
123+
try (InputStream in = resourceLoader.getResource(content).getInputStream()) {
124+
return load(in);
125125
}
126126
catch (IOException | UncheckedIOException ex) {
127127
throw new IOException("Error reading certificate or key from file '%s'".formatted(content), ex);

0 commit comments

Comments
 (0)