Author: fanningpj
Date: Wed Jan 2 02:48:14 2019
New Revision: 1850145
URL: http://svn.apache.org/viewvc?rev=1850145&view=rev
Log:
XMLBEANS-526 try to make resource loading more robust
Modified:
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java
Modified:
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java
URL:
http://svn.apache.org/viewvc/xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java?rev=1850145&r1=1850144&r2=1850145&view=diff
==============================================================================
---
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java
(original)
+++
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java
Wed Jan 2 02:48:14 2019
@@ -41,6 +41,7 @@ import org.apache.xmlbeans.XmlAnySimpleT
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
import org.apache.xmlbeans.ResourceLoader;
+import org.apache.xmlbeans.impl.common.DefaultClassLoaderResourceLoader;
import org.apache.xmlbeans.impl.common.NameUtil;
import org.apache.xmlbeans.impl.common.QNameHelper;
import org.apache.xmlbeans.impl.common.XBeanDebug;
@@ -418,9 +419,8 @@ public class SchemaTypeSystemImpl extend
{
is =
SchemaTypeSystemImpl.class.getResourceAsStream(HOLDER_TEMPLATE_CLASSFILE);
if (is == null) {
- ClassLoaderResourceLoader clLoader = new
ClassLoaderResourceLoader(SchemaTypeSystemImpl.class.getClassLoader());
+ DefaultClassLoaderResourceLoader clLoader = new
DefaultClassLoaderResourceLoader();
is = clLoader.getResourceAsStream(HOLDER_TEMPLATE_CLASSFILE);
- clLoader.close();
}
if (is == null) {
throw new SchemaTypeLoaderException("couldn't find resource: "
+ HOLDER_TEMPLATE_CLASSFILE, _name, null,
SchemaTypeLoaderException.IO_EXCEPTION);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]