xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r227480 - /xmlbeans/trunk/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
Date Thu, 04 Aug 2005 20:54:35 GMT
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


Mime
View raw message