Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
Version 2, Version 2.1
-
None
-
None
Description
org.apache.xmlbeans.impl.common.ResolverUtil may cause an NPE to be thrown and caught in its static initialization block if the System property "xmlbean.entityResolver" is not set.
I noticed this whilst debugging Geronimo in Eclipse with a breakpoint on NullPointerExceptions being thrown/caught.
I will attach a patch that will prevent the NullPointerException being unnecessarily being thrown/caught.
Thread [http-0.0.0.0-8080-Processor25] (Suspended (exception java.lang.NullPointerException))
org.apache.xmlbeans.impl.common.ResolverUtil.<clinit>() line: 34
org.apache.xmlbeans.impl.store.Locale.getSaxLoader(org.apache.xmlbeans.XmlOptions) line: 3010
org.apache.xmlbeans.impl.store.Locale.parse(java.lang.String, org.apache.xmlbeans.SchemaType, org.apache.xmlbeans.XmlOptions) line: 703
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(java.lang.String, org.apache.xmlbeans.SchemaType, org.apache.xmlbeans.XmlOptions) line: 687
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(org.apache.xmlbeans.SchemaTypeLoader, java.lang.String, org.apache.xmlbeans.SchemaType, org.apache.xmlbeans.XmlOptions) line: 674
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl(org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase).parse(java.lang.String, org.apache.xmlbeans.SchemaType, org.apache.xmlbeans.XmlOptions) line: 208
org.apache.xmlbeans.XmlObject$Factory.parse(java.lang.String, org.apache.xmlbeans.XmlOptions) line: 632
org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.parse(java.lang.String) line: 92
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(java.io.File, java.util.jar.JarFile) line: 173
<SNIP>