Affects Version/s: None
Fix Version/s: None
Operating System: other
This bug applies when an application allows both manual editing of its
configuration files, and manipulation of the configuration via software. When
saving the configuration file after changing, its file structure - file,
section and line comments - will all be lost. Next time a human tries to edit
the configuration file, all property documentation will be lost.
I have created a fix for this problem, applicable to PropertiesConfiguration
and XMLPropertiesConfiguration. The fix allows these classes to preserve a
list of comment lines preceding each property line. By default, comments are
not preserved; in case the comment preservation is required, it should be
enabled prior to loading the configuration file using:
The fix is implemented and tested, attached as a patch file to this bug.