You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2008/05/08 04:37:52 UTC

svn commit: r654395 - /xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java

Author: mrglavas
Date: Wed May  7 19:37:52 2008
New Revision: 654395

URL: http://svn.apache.org/viewvc?rev=654395&view=rev
Log:
Before returning control to the user, disconnect the schema loader and other
objects from the XMLReader. This should allow for better garbage collection.

Modified:
    xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java

Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=654395&r1=654394&r2=654395&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Wed May  7 19:37:52 2008
@@ -510,6 +510,15 @@
         	catch (SAXException se) {
         		return null;
         	}
+        	// Disconnect the schema loader and other objects from the XMLReader
+        	try {
+        	    parser.setContentHandler(null);
+        	    parser.setErrorHandler(null);
+        	}
+        	// Ignore any exceptions thrown by the XMLReader. Old versions of SAX
+        	// required an XMLReader to throw a NullPointerException if an attempt
+        	// to set a handler to null was made.
+        	catch (Exception e) {}
         	schemaRootDoc = fXSContentHandler.getDocument();
             if (schemaRootDoc == null) {
                 // something went wrong right off the hop



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org