You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ra...@apache.org on 2005/08/04 22:54:35 UTC
svn commit: r227480 -
/xmlbeans/trunk/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
Author: radup
Date: Thu Aug 4 13:54:33 2005
New Revision: 227480
URL: http://svn.apache.org/viewcvs?rev=227480&view=rev
Log:
Fix for XMLBEANS-133 and XMLBEANS-185. If an error was found with any xsdconfig files StscState.get() could be called before StscState.start() which resulted in an NPE.
Contributed by Lawrence Jones
Modified:
xmlbeans/trunk/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
Modified: xmlbeans/trunk/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java?rev=227480&r1=227479&r2=227480&view=diff
==============================================================================
--- xmlbeans/trunk/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java (original)
+++ xmlbeans/trunk/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java Thu Aug 4 13:54:33 2005
@@ -748,6 +748,10 @@
{
XmlErrorWatcher errorListener = new XmlErrorWatcher(outerErrorListener);
+ // construct the state (have to initialize early in case of errors)
+ StscState state = StscState.start();
+ state.setErrorListener(errorListener);
+
// For parsing XSD and WSDL files, we should use the SchemaDocument
// classloader rather than the thread context classloader. This is
// because in some situations (such as when being invoked by ant
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org