Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
4519
Description
This was detected in Digester 1.1.1.
The method "public XMLReader getReader()" returns null if it cannot instantiate
a SAX parser. This is fine, but the public "parse" methods all contain
variations of "getReader().parse(...)". If a SAX parser cannot be instantiated
(which could happen if an incompatible SAX jar were in the classpath, for
example), then the parse methods will throw NullPointerException.
Suggested fixes:
Either
1) Change the public getReader() and getParser() methods to throw SAXException,
instead of returning null, or
2) Change the implementations of the parse methods to throw SAXException if
getReader() returns null.