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

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


The following commit(s) were added to refs/heads/main by this push:
     new 014a7df  CAMEL-17114 Use current thread classloader in jslt resource 
loading (#6318)
014a7df is described below

commit 014a7df8fc46125a3fd119f35f0750b7719b5f32
Author: Kevin Howell <ke...@kahowell.net>
AuthorDate: Thu Oct 21 04:22:22 2021 -0400

    CAMEL-17114 Use current thread classloader in jslt resource loading (#6318)
    
    https://issues.apache.org/jira/browse/CAMEL-17114
    
    See also: quarkusio/quarkus#2531
---
 .../src/main/java/org/apache/camel/component/jslt/JsltEndpoint.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/components/camel-jslt/src/main/java/org/apache/camel/component/jslt/JsltEndpoint.java
 
b/components/camel-jslt/src/main/java/org/apache/camel/component/jslt/JsltEndpoint.java
index afdd670..e8a8255 100644
--- 
a/components/camel-jslt/src/main/java/org/apache/camel/component/jslt/JsltEndpoint.java
+++ 
b/components/camel-jslt/src/main/java/org/apache/camel/component/jslt/JsltEndpoint.java
@@ -101,7 +101,7 @@ public class JsltEndpoint extends ResourceEndpoint {
                 if (jsltStringFromHeader != null) {
                     parser = new Parser(new 
StringReader(jsltStringFromHeader)).withSource("<inline>");
                 } else {
-                    stream = 
JsltEndpoint.class.getClassLoader().getResourceAsStream(getResourceUri());
+                    stream = 
Thread.currentThread().getContextClassLoader().getResourceAsStream(getResourceUri());
                     if (stream == null) {
                         throw new JsltException("Cannot load resource '" + 
getResourceUri() + "': not found");
                     }

Reply via email to