You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ji...@apache.org on 2004/04/23 19:44:53 UTC
[jira] Closed: (XERCESJ-553) Inconsistent behaviour for 'null' SAX event handlers
Message:
The following issue has been closed.
Resolver: Michael Glavassevich
Date: Fri, 23 Apr 2004 10:43 AM
Closed.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESJ-553
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESJ-553
Summary: Inconsistent behaviour for 'null' SAX event handlers
Type: Bug
Status: Closed
Resolution: FIXED
Project: Xerces2-J
Components:
SAX
Versions:
2.2.1
Assignee: Michael Glavassevich
Reporter: Michael Glavassevich
Created: Tue, 24 Dec 2002 5:04 PM
Updated: Fri, 23 Apr 2004 10:43 AM
Environment: Operating System: All
Platform: All
Description:
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).
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org