You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by kk...@apache.org on 2004/12/20 21:03:54 UTC
svn commit: r122873 - /xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java
Author: kkrouse
Date: Mon Dec 20 12:03:52 2004
New Revision: 122873
URL: http://svn.apache.org/viewcvs?view=rev&rev=122873
Log:
added null check
Modified:
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java
Modified: xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java?view=diff&rev=122873&p1=xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java&r1=122872&p2=xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java&r2=122873
==============================================================================
--- xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java (original)
+++ xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java Mon Dec 20 12:03:52 2004
@@ -198,14 +198,17 @@
options = XmlOptions.maskNull(options);
ArrayList schemas = new ArrayList();
- for (int i = 0; i < input.length; i++)
+ if (input != null)
{
- if (input[i] instanceof Schema)
- schemas.add(input[i]);
- else if (input[i] instanceof SchemaDocument && ((SchemaDocument)input[i]).getSchema() != null)
- schemas.add(((SchemaDocument)input[i]).getSchema());
- else
- throw new XmlException("Thread " + Thread.currentThread().getName() + ": The " + i + "th supplied input is not a schema or a config document: its type is " + input[i].schemaType());
+ for (int i = 0; i < input.length; i++)
+ {
+ if (input[i] instanceof Schema)
+ schemas.add(input[i]);
+ else if (input[i] instanceof SchemaDocument && ((SchemaDocument)input[i]).getSchema() != null)
+ schemas.add(((SchemaDocument)input[i]).getSchema());
+ else
+ throw new XmlException("Thread " + Thread.currentThread().getName() + ": The " + i + "th supplied input is not a schema or a config document: its type is " + input[i].schemaType());
+ }
}
Collection userErrors = (Collection)options.get(XmlOptions.ERROR_LISTENER);
@@ -398,7 +401,7 @@
/**
* Generate java source files for a SchemaTypeSystem.
* Please do not invoke this method directly as the signature could change unexpectedly.
- * Use {@link org.apache.xmlbeans.XmlBeans#compileXmlBeans(String, org.apache.xmlbeans.SchemaTypeSystem, org.apache.xmlbeans.XmlObject[], org.apache.xmlbeans.BindingConfig, org.apache.xmlbeans.SchemaTypeLoader, org.apache.xmlbeans.Filer, org.apache.xmlbeans.XmlOptions)} instead.
+ * Use {@link org.apache.xmlbeans.XmlBeans#compileXmlBeans}
*
* @param system the SchemaTypeSystem to generated java source for
* @param filer to create the java source files
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org