[PATCH] ResolverUtil may cause an NPE to be thrown and caught in its static
initialization block
------------------------------------------------------------------------------------------------
Key: XMLBEANS-255
URL: http://issues.apache.org/jira/browse/XMLBEANS-255
Project: XMLBeans
Type: Bug
Versions: Version 2, Version 2.1
Reporter: John Sisson
Priority: Trivial
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>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]