mirror of
https://github.com/apache/activemq.git
synced 2025-02-10 20:15:56 +00:00
If thread context class loader is null use the class loader of the FactoryFinder class
git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-4.1@512994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b47be19b5f
commit
d458a7943c
@ -81,7 +81,9 @@ public class FactoryFinder {
|
||||
String uri = path + key;
|
||||
|
||||
// lets try the thread context class loader first
|
||||
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(uri);
|
||||
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
||||
if (classLoader == null) classLoader = getClass().getClassLoader();
|
||||
InputStream in = classLoader.getResourceAsStream(uri);
|
||||
if (in == null) {
|
||||
in = FactoryFinder.class.getClassLoader().getResourceAsStream(uri);
|
||||
if (in == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user