mirror of https://github.com/apache/activemq.git
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/trunk@513003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
44bafc3e03
commit
eb19487b66
|
@ -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…
Reference in New Issue