Skip to content

Commit 4d137d4

Browse files
committed
Merge branch '3.3.x' into 3.4.x
Closes gh-44454
2 parents 9c189a0 + 8577718 commit 4d137d4

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -119,8 +119,8 @@ static PemContent load(String content, ResourceLoader resourceLoader) throws IOE
119119
if (isPresentInText(content)) {
120120
return new PemContent(content);
121121
}
122-
try {
123-
return load(resourceLoader.getResource(content).getInputStream());
122+
try (InputStream in = resourceLoader.getResource(content).getInputStream()) {
123+
return load(in);
124124
}
125125
catch (IOException | UncheckedIOException ex) {
126126
throw new IOException("Error reading certificate or key from file '%s'".formatted(content), ex);

0 commit comments

Comments
 (0)