RFR: 8213325: (props) Properties.loadFromXML does not fully comply with the spec

Roman Kennke rkennke at redhat.com
Tue Aug 20 16:37:30 UTC 2019

I added one extra verification to the JAXP based properties parser to
verify that no extra internal DTD is being supplied. As far as I can
tell, the other checks that have been added to the ukit parser for this
bug are already done by the JAXP parser, by validating the XML against
the built-in DTD.


This passes all relevant tests, and I also run tier1 w/o regressions.

What do you think?


> This is a backport of:
> https://bugs.openjdk.java.net/browse/JDK-8227274
> which is a backport of the original:
> https://bugs.openjdk.java.net/browse/JDK-8213325
> It's mostly the original change with a few significant extra modifications:
> -
> src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider
> is changed from:
> sun.util.xml.PlatformXmlPropertiesProvider
> to:
> jdk.internal.util.xml.BasicXmlPropertiesProvider
> The reason is that the fix is for the latter, but 8u uses the former by
> default. As far as I understand, the latter uses the new slimmer parser,
> while the former uses the fullblown XML parser, but I am not sure about
> that. However, we need to consider this, because it might be a very
> significant change.
> The alternative would be to port over the fixes to the other XML parser,
> which I have no desire to do.
> - The (test) JAR file:
> test/java/util/spi/ResourceBundleControlProvider/rbcontrolprovider.jar
> has been regenerated from the modified sources XmlRB.xml and XmlRB_ja.xml.
> This is not present in jdk11 and later. I think it's generated on the
> fly and not checked-in.
> Webrev:
> http://cr.openjdk.java.net/~rkennke/JDK-8213325/webrev.00/
> Testing: New testcases are passing. No regressions in tier1 tests.
> Opinions? Can I get reviews?
> Thanks,
> Roman

More information about the jdk8u-dev mailing list