DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15653>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15653 Inconsistent behaviour for 'null' SAX event handlers Summary: Inconsistent behaviour for 'null' SAX event handlers Product: Xerces2-J Version: 2.2.1 Platform: All OS/Version: All Status: NEW Severity: Minor Priority: Other Component: SAX AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The XMLReader documentation (looks like SAX pre-release 2) for the current Xerces distribution states that a java.lang.NullPointerException will be thrown if the handler arguement passed to setContentHandler(), setDTDHandler(), setErrorHandler(), or setEntityResolver() is null. The XMLReader documentation for SAX 2.0.1 has no requirement for throwing NullPointerExceptions when a user attempts to set any of the SAX event handlers to null, which I believe implies that a user should be able to set an event handler to null. Currently AbstractSAXParser will throw a NullPointerException if a user attempts to set a DTDHandler to null, but it allows null ContentHandlers, EntityResolvers, and ErrorHandlers. This behaviour doesn't meet either version of the documentation. Also, SAX1 does not specify that a NullPointerException should be thrown when a DTDHandler, EntityResolver, or ErrorHandler is set to null on a Parser. AbstractSAXParser implements both org.xml.sax.Parser and org.xml.sax.XMLReader, so it isn't possible to meet the requirements of the pre-release docs in this class, since the behaviour expected is based on the context in which the parser is used (SAX1/SAX2). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
