camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (CAMEL-572) loadResourceAsStream in ObjectHelper is incorrect
Date Tue, 03 Jun 2008 18:17:00 GMT

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

Claus Ibsen reassigned CAMEL-572:
---------------------------------

    Assignee: Claus Ibsen

> 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
>            Assignee: Claus Ibsen
>             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.


Mime
View raw message