mirror of https://github.com/apache/activemq.git
applied patch for AMQ-1229 with thanks!
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@546485 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
45f6a87244
commit
5cb9419373
|
@ -67,10 +67,17 @@ public class FactoryFinder {
|
|||
if (className == null) {
|
||||
throw new IOException("Expected property is missing: " + propertyPrefix + "class");
|
||||
}
|
||||
Class clazz;
|
||||
try {
|
||||
clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
Class clazz = null;
|
||||
ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
||||
if (loader != null) {
|
||||
try {
|
||||
clazz = loader.loadClass(className);
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
if (clazz == null) {
|
||||
clazz = FactoryFinder.class.getClassLoader().loadClass(className);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue