– suppress timestamp comment

Spread the love

Question Description

Is it possible to force Properties not to add the date comment in front? I mean something like the first line here:

#Thu May 26 09:43:52 CEST 2011

I would like to get rid of it altogether. I need my config files to be diff-identical unless there is a meaningful change.

Practice As Follows

Given the source code or Properties, no, it’s not possible. BTW, since Properties is in fact a hash table and since its keys are thus not sorted, you can’t rely on the properties to be always in the same order anyway.

I would use a custom algorithm to store the properties if I had this requirement. Use the source code of Properties as a starter.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.