[ 
https://issues.apache.org/activemq/browse/CAMEL-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Freeman Fang updated CAMEL-572:
-------------------------------

    Attachment: camel-572.patch

> loadResourceAsStream in ObjectHelper is incorrect
> -------------------------------------------------
>
>                 Key: CAMEL-572
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-572
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Freeman Fang
>             Fix For: 1.4.0
>
>         Attachments: camel-572.patch
>
>
> it is
> try {
>         ClassLoader contextClassLoader = 
> Thread.currentThread().getContextClassLoader();
>         if (contextClassLoader != null) {
>             in = contextClassLoader.getResourceAsStream(name);
>         }
>  ----  if (in != null) {  -----//here is incorrect, should be see if  
> in==null then get chance to use another classloader to load the stream
> +++ if (in == null) { +++
>             in = 
> ObjectHelper.class.getClassLoader().getResourceAsStream(name);
>         }
>         } catch (Exception e){
>               System.out.println("Could not find class: " + name + ". Reason: 
> " + e);
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to