Author: dain
Date: Wed Feb 28 14:05:55 2007
New Revision: 513003
URL: http://svn.apache.org/viewvc?view=rev&rev=513003
Log:
If thread context class loader is null use the class loader of the
FactoryFinder class
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java?view=diff&rev=513003&r1=513002&r2=513003
==============================================================================
---
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java
(original)
+++
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java
Wed Feb 28 14:05:55 2007
@@ -81,7 +81,9 @@
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) {