RFR(JDK 13/java.xml) 8206132: DOM parser does not honor DocumentBuilderFactory.setExpandEntityReferences(false)
huizhe.wang at oracle.com
Fri Jan 25 18:20:28 UTC 2019
Please review an updated webrev for this change. In the update, the
change to XMLDocumentFragmentScannerImpl was to add the default value
when calling getFeature at line 606 that allowed the previous commented
tests to pass properly. The other change was to LSSerializerTest. Refer
to the results (RESULT_TRUE and RESULT_FALSE at line 250 and 271),
before the change, it outputted both entity references and the expanded
text, after the change, it's either the EntityReference or Text, which
makes better sense.
On 1/18/19, 11:19 AM, Joe Wang wrote:
> Please hold on reviewing the webrevs as the tests passed while the new
> tests were commented out as Lance pointed out.
> On 1/18/19, 10:05 AM, Joe Wang wrote:
>> Please review a change to the DOM parser so that it complies with the
>> specification with regard to the ExpandEntityReferences feature. This
>> change corrects the behavior so that the resulting DOM tree includes
>> EntityReference nodes but not the expanded Text nodes when the
>> feature is off. It also means that the DOM parser will not attempt to
>> read entity references if any.
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8206132
>> webrevs: http://cr.openjdk.java.net/~joehw/jdk13/8206132/webrev/
More information about the core-libs-dev