Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8213325 (props) Properties.loadFromXML does not fully comply with the spec
  3. JDK-8214820

Release Note: Properties.loadFromXML method changed to comply with the specification

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      The implementation of the `java.util.Properties loadFromXML` method is 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">
      ```

        Attachments

          Activity

            People

            • Assignee:
              joehw Joe Wang
              Reporter:
              joehw Joe Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: