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:
Pinaki Poddar 2007-11-20 23:12:33 +00:00
parent aa5259d521
commit 6ea5a81c93
1 changed files with 1 additions and 1 deletions

View File

@ -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 {