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=3945>. 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=3945 NPE when using an InputSource for a document with an external parsed entity ------- Additional Comments From [EMAIL PROTECTED] 2001-10-29 10:06 ------- After having debugged Xerces, I think I've figured what causes the problem. When an InputSource is created from a Reader, it's systemId is null. When a document is parsed, during the setup in XMLParser, DefaultEntityHandler.startReadingFromDocument() is called. It initialises it's fSystemId field from InputSource.getSystemId() and thus it is initialised to null. So when DefaultEntityHandler.addExternalEntityDecl() is called later, it passes the null fSystemId to StringPool.addSymbol() and causes the NPE. If the InputSource is created using a filename or created using a Reader and a systemId, the problem does not occur. One possible solution would be to make Xerces report an error if an external entity is encountered when a base systemId is not available (i.e. null). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
