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

Joe Wang huizhe.wang at oracle.com
Mon Jun 11 19:08:17 UTC 2012

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 

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:

All of unit/sqe/tck tests passed.

Please review.


More information about the core-libs-dev mailing list