I realised a more efficient solution to the NPEs would be to immediately return from all XNI event methods if the document handler is null. This way, we don't create the events for the PSVI stream, only to drop them when we find there's no document handler.
The attached patch should be used, instead of the previous one.
Peter McCracken/Toronto/IBM
(See attached file: PSVIWriter.java.diff)
Peter
McCracken/Toronto To: [EMAIL PROTECTED]
/[EMAIL PROTECTED] cc:
Subject: NPE patch for PSVIWriter
08/18/2003 01:45
PM
Please respond to
xerces-j-dev
Hi,
Here's a patch for PSVIWriter, which avoids NullPointerExceptions when the
document handler is null.
However, I should caution people against using a PSVIWriter in the pipeline
when it has a null document handler, because it would be unnecessary. It
would do work to convert the pipeline to represent the PSVI, and then drop
that information because it has no place to send it.
Cheers,
Peter McCracken/Toronto/IBM
(See attached file: PSVIWriter.java.diff)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
#### PSVIWriter.java.diff has been removed from this note on August 18,
2003 by Peter McCracken
PSVIWriter.java.diff
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
