https://issues.apache.org/bugzilla/show_bug.cgi?id=33447


ppoulard <[EMAIL PROTECTED]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[EMAIL PROTECTED]
                   |                            |a.fr
             Status|NEEDINFO                    |NEW




--- Comment #3 from ppoulard <[EMAIL PROTECTED]>  2008-11-28 08:03:32 PST ---
Hi,

org.apache.batik.dom.util.SAXDocumentFactory cause a
java.lang.NullPointerException when it is created with a SAX source that
doesn't refer to an InputSource

the method startElement() contains the following lines:
                isStandalone = parser.getFeature
                    ("http://xml.org/sax/features/is-standalone";);
but the variable parser is null if the method createDocument(InputSource is)
has not been called before (and if the SAX source is made of a Reader for
example, it won't be callde)

suggestion: correct the code in the method startElement() like this:
                isStandalone = parser == null ? true : parser.getFeature
                    ("http://xml.org/sax/features/is-standalone";);

Regards,
P. Poulard


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to