camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAMEL-572) loadResourceAsStream in ObjectHelper is incorrect
Date Tue, 03 Jun 2008 11:20:00 GMT
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


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