[7u6] RFR (JAXP) : 7157610: NullPointerException occurs when parsing XML doc

Lance Andersen - Oracle Lance.Andersen at oracle.com
Mon Jun 11 19:33:00 UTC 2012

Looks OK joe.

Do you still need the comment

 //return fSupportDTD? next() : dtdEvent;

in XMLDocumentScannerImpl?  If not you might consider removing it.


On Jun 11, 2012, at 3:08 PM, Joe Wang wrote:

> As reported in 7157610, when setFeature("http://apache.org/xml/features/disallow-doctype-decl", true) is set on SAXParserFactory object, XMLReader object or DocumentBuilderFactory object, NullPointerException will be thrown when parsing XML document that has DOCTYPE declaration.
> The cause of the issue was that when StAX was added, the above feature was reused for a StAX feature, SupportDTD. However, in the StAX spec, the requirement was not always consistent with that of feature 'disallow-doctype-decl'.
> The patch is to recover what was the original disallow-doctype-decl, reporting error when disallow-doctype-decl is true, and change everything else that was added for SupportDTD to be governed by a new flag 'fSupportDTD'.
> Here's the webrev:
> http://cr.openjdk.java.net/~joehw/7u6/7157610/webrev/
> All of unit/sqe/tck tests passed.
> Please review.
> Thanks,
> Joe

Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com

More information about the core-libs-dev mailing list