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

Lance Andersen - Oracle Lance.Andersen at oracle.com
Mon Jun 11 20:27:42 UTC 2012


Hi Joe,

No need to see it with just the change of the comment removed...

good to go by me :-)

Best Lance On Jun 11, 2012, at 4:23 PM, Joe Wang wrote:

Thanks Lance.

That comment was there forever, removed now :) New webrev: http://cr.openjdk.java.net/~joehw/7u6/7157610/webrev/ -Joe

On 6/11/2012 12:33 PM, Lance Andersen - Oracle wrote:

Looks OK joe. Do you still need the comment //return fSupportDTD? next() : dtdEvent; in XMLDocumentScannerImpl? If not you might consider removing it. Best Lance 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

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