Alan.Bateman at oracle.com
Tue Oct 1 06:51:13 UTC 2019
On 01/10/2019 01:13, Aaron Scott-Boddendijk wrote:
> A tiny datapoint, but this would remove an annoyance in managing clean
> configurations of a Minecraft server - `server.properties` suffers
> from the same time-stamped comment and unpredictable ordering
> (currently requiring a cleaning script to strip the comment and sort
> Not only would it be nice to have the ability, via an overload, for
> the caller to specify preferred ordering but it'd be nice if a system
> property could be provided to choose the default order for the
> `Properties` writer.
I see Mark has created JDK-8231640  to look at introduce a new store
method that store the properties in canonical form. I couldn't find any
other issues on this issue.
As regards the existing methods. The ordering is not specified so there
is flexibility to have the implementation write in sorted order. I don't
think we can do anything about the date/time stamp without specification
changes, e.g. re-specify the comment parameter so that a non-null value
is the only comment lines that are written. The impact of changing these
methods it is not clear and introducing a new APIs would be safer route.
More information about the jdk-dev