mirror of https://github.com/apache/openjpa.git
OPENJPA-449 : initializing _pcClassLoaders in constructor instead of conditionally inside loadPersistentTypes(). Saves NPE on new Broker construction in multi-threaded scenarios' openjpa-kernel\src\main\java\org\apache\openjpa\kernel\AbstractBrokerFactory.java
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@596871 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aa5259d521
commit
6ea5a81c93
|
@ -134,6 +134,7 @@ public abstract class AbstractBrokerFactory
|
|||
*/
|
||||
protected AbstractBrokerFactory(OpenJPAConfiguration config) {
|
||||
_conf = config;
|
||||
_pcClassLoaders = new ReferenceHashSet(ReferenceHashSet.WEAK);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +256,6 @@ public abstract class AbstractBrokerFactory
|
|||
if (needsSub(cls))
|
||||
toRedefine.add(cls);
|
||||
}
|
||||
_pcClassLoaders = new ReferenceHashSet(ReferenceHashSet.WEAK);
|
||||
_pcClassLoaders.add(loader);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue