>The documentation of XMLReader's setContentHandler(contentHandler) says
>it should throw a NullPointerException if the 'contentHandler' passed
>is null. The current implementation (AbstractSAXParser's setContenthandler
())
>doesn't throw an NPE.
This seems inconsistant. The same documentation also says:
* If the application does not register a content handler, all
* content events reported by the SAX parser will be silently
* ignored.
Since it is perfectly legal to use an XMLReader without ever setting
a content handler, it sounds like a bug to not allow that content
handler to be "deregistered", i.e. set to null.
>Also, the same is the case with setErrorHandler(). The documentation
>in AbstractSAXParser and DOMParser says it should but it doesn't.
>SAX1 doesn't say that an NPE should be thrown, but SAX2 does.
>Is this method following SAX1 ? or SAX2 ?
ditto:
* If the application does not register an error handler, all
* error events reported by the SAX parser will be silently
* ignored; however, normal processing may not continue. It is
* highly recommended that all SAX applications implement an
* error handler to avoid unexpected bugs.
These should be reported as bugs in the SAX2 documentation.
Regards,
Glenn
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]