Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8231640 (prop) Canonical property storage
  3. JDK-8274149

Release Note: New System Property to Control the Default Date Comment Written Out by java.util.Properties::store Methods

    XMLWordPrintable

    Details

    • Subcomponent:
    • Verification:
      Verified

      Description

      A new system property, `java.properties.date`, has been introduced to allow applications to control the default date comment written out by the `java.util.Properties::store` methods. This system property is expected to be set while launching `java`. Any non-empty value of this system property results in that value being used as a comment instead of the default date comment. In the absence of this system property or when the value is empty, the `Properties::store` methods continue to write the default date comment.
      An additional change has also been made in the implementation of the `Properties::store` methods to write out the key/value property pairs in a deterministic order. The implementation of these methods now uses the natural sort order of the property keys while writing them out. However, the implementation of these methods continues to use the iteration order when any sub-class of `java.util.Properties` overrides the `entrySet()` method to return a different `Set` than that returned by `super.entrySet()`.

      The combination of the deterministic ordering of the properties that get written out with the new system property is particularly useful in environments where applications require the contents of the stored properties to be reproducible. In such cases, applications are expected to provide a fixed value of their choice to this system property.

        Attachments

          Activity

            People

            Assignee:
            jpai Jaikiran Pai
            Reporter:
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: