JDK-8214820 : Release Note: Changed Properties.loadFromXML to Comply with Specification
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 11.0.5-oracle,12
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2018-12-04
  • Updated: 2021-03-17
  • Resolved: 2018-12-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 8
11.0.5-oracleResolved 12Resolved 8u281Resolved
The implementation of the `java.util.Properties.loadFromXML` method has been changed to comply with its specification. Specifically, the underlying XML parser implementation now rejects non-compliant XML documents by throwing an `InvalidPropertiesFormatException` as specified by the `loadFromXML` method.

The effect of the change is as follows:

- Documents created by `Properties.storeToXML`: No change. `Properties.loadFromXML` will have no problem reading such files.

- Documents not created by `Properties.storeToXML`: Any documents containing DTDs not in the format as specified in `Properties.loadFromXML` will be rejected. This means the DTD shall be exactly as follows (as generated by the `Properties.storeToXML` method):

    <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">