This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.14.x by this push:
     new 44b91f4  CAMEL-17524: Problem loading resource in OSGi
44b91f4 is described below

commit 44b91f4e37159064e90e1e8ec22a8036584911cd
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jan 21 10:29:47 2022 +0100

    CAMEL-17524: Problem loading resource in OSGi
---
 .../apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java
 
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java
index eeda771..9228362 100644
--- 
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java
+++ 
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java
@@ -340,7 +340,11 @@ public final class XmlSignatureHelper {
         if (path == null) {
             throw new IllegalArgumentException("path is null");
         }
-        return org.apache.camel.util.ObjectHelper.loadResourceAsStream(path);
+        InputStream is = 
org.apache.camel.util.ObjectHelper.loadResourceAsStream(path);
+        if (is == null) {
+            is = XmlSignatureHelper.class.getResourceAsStream(path);
+        }
+        return is;
     }
 
     public static List<AlgorithmMethod> getTransforms(List<AlgorithmMethod> 
list) {

Reply via email to