Message:

   The following issue has been closed.

   Resolver: Michael Glavassevich
       Date: Fri, 23 Apr 2004 10:33 AM

Closed.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-580

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-580
    Summary: NullPointerException thrown in SAXParser when ErrorHandler is set to null
       Type: Bug

     Status: Closed
 Resolution: FIXED

    Project: Xerces2-J
 Components: 
             SAX
   Versions:
             2.3.0

   Assignee: Michael Glavassevich
   Reporter: Michael Glavassevich

    Created: Wed, 29 Jan 2003 3:19 AM
    Updated: Fri, 23 Apr 2004 10:33 AM
Environment: Operating System: All
Platform: All

Description:
The SAXParser will throw a NullPointerException if the ErrorHandler has been 
explicitly set to null by the user, and the parser attempts to report a 
warning, error, or fatalError during a parse. This occurs because the 
ErrorHandlerWrapper doesn't check if it has a null reference to an ErrorHandler 
before invoking its methods. The user is expecting a SAXParseException.

Sample stack trace:
java.lang.NullPointerException
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError
(ErrorHandlerWrapper.java:215)
        at org.apache.xerces.impl.XMLErrorReporter.reportError
(XMLErrorReporter.java:385)
        at org.apache.xerces.impl.XMLErrorReporter.reportError
(XMLErrorReporter.java:315)
        at org.apache.xerces.impl.XMLScanner.reportFatalError
(XMLScanner.java:1294)
        at 
org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch
(XMLDocumentScannerImpl.java:809)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocumentFragmentScannerImpl.java:348)
        at org.apache.xerces.parsers.DTDConfiguration.parse
(DTDConfiguration.java:539)
        at org.apache.xerces.parsers.DTDConfiguration.parse
(DTDConfiguration.java:595)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at org.apache.xerces.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:1064)
        at com.test2003.SAXTester.main(SAXTester.java:186)


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to