You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/09/06 10:09:33 UTC
[camel] branch CAMEL-19840/warn-no-keystore-4.1 created (now e1af466a426)
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a change to branch CAMEL-19840/warn-no-keystore-4.1
in repository https://gitbox.apache.org/repos/asf/camel.git
at e1af466a426 CAMEL-19840: camel-core-api - Warn when the key store cannot be found
This branch includes the following new commits:
new e1af466a426 CAMEL-19840: camel-core-api - Warn when the key store cannot be found
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[camel] 01/01: CAMEL-19840: camel-core-api - Warn when the key store cannot be found
Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch CAMEL-19840/warn-no-keystore-4.1
in repository https://gitbox.apache.org/repos/asf/camel.git
commit e1af466a426e62baaf7cafd290cff11d549b44ad
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Wed Sep 6 10:18:20 2023 +0200
CAMEL-19840: camel-core-api - Warn when the key store cannot be found
---
.../java/org/apache/camel/support/jsse/KeyStoreParameters.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/core/camel-api/src/main/java/org/apache/camel/support/jsse/KeyStoreParameters.java b/core/camel-api/src/main/java/org/apache/camel/support/jsse/KeyStoreParameters.java
index 67677a70799..b474dd0bc6d 100644
--- a/core/camel-api/src/main/java/org/apache/camel/support/jsse/KeyStoreParameters.java
+++ b/core/camel-api/src/main/java/org/apache/camel/support/jsse/KeyStoreParameters.java
@@ -190,7 +190,13 @@ public class KeyStoreParameters extends JsseParameters {
ks.load(null, ksPassword);
} else {
InputStream is = this.resolveResource(this.parsePropertyValue(this.resource));
- ks.load(is, ksPassword);
+ if (is == null) {
+ LOG.warn("No keystore could be found at {}.", this.resource);
+ } else {
+ try (is) {
+ ks.load(is, ksPassword);
+ }
+ }
}
if (LOG.isDebugEnabled()) {