Merge branch '3.4.x'

Closes gh-44455
This commit is contained in:
Andy Wilkinson
2025-02-26 15:46:01 +00:00

View File

@@ -120,8 +120,8 @@ public final class PemContent {
if (isPresentInText(content)) {
return new PemContent(content);
}
try {
return load(resourceLoader.getResource(content).getInputStream());
try (InputStream in = resourceLoader.getResource(content).getInputStream()) {
return load(in);
}
catch (IOException | UncheckedIOException ex) {
throw new IOException("Error reading certificate or key from file '%s'".formatted(content), ex);