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 that gets written out by java.util.Properties::store methods

    XMLWordPrintable

    Details

      Description

      A new system property `java.properties.date` has been introduced to allow applications to control the default date comment that gets written out by the `java.util.Properties::store` methods. This system property is expected to be set while launching `java` and any non-empty value of this system property will result 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 will 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 use the natural sort order of the property keys while writing them out. The implementation of these methods however will continue to use the iteration order if 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, plus 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: