xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrgla...@apache.org
Subject svn commit: r654396 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Date Thu, 08 May 2008 02:40:00 GMT
Author: mrglavas
Date: Wed May  7 19:40:00 2008
New Revision: 654396

URL: http://svn.apache.org/viewvc?rev=654396&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/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=654396&r1=654395&r2=654396&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
(original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Wed May  7 19:40:00 2008
@@ -513,6 +513,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


Mime
View raw message