You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2008/06/03 20:17:00 UTC
[jira] Assigned: (CAMEL-572) loadResourceAsStream in ObjectHelper
is incorrect
[ 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.