|
It makes a bit more sense when you look at the constructor of __XmlInputFactory:
public __XMLInputFactory() {
Constructor<? extends XMLInputFactory> factory = DEFAULT_FACTORY;
ClassLoader loader = Thread.currentThread().getContextClassLoader();
try {
if (loader != null) {
Class<? extends XMLInputFactory> provider = __RedirectedUtils.loadProvider(XMLInputFactory.class, loader);
if (provider != null)
factory = provider.getConstructor();
}
actual = factory.newInstance();
... catch and so on ...
When your helper is loaded it's grabbing the TCCL (my module loader) and loading the actual XmlInputFactory with it leaving us with a static reference from your loader to mine.
I suppose it's possible that Timer-3 (a jgroups thread) should not be executing with my modules loader but: a) I don't actually know enough about jgroups to know if that's true b) This doesn't really look like it should be static
If you would like I can have a look at a more appropriate caching strategy for XmlParserHelper and update my PR?
|