Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
Operating System: other
Platform: Other
-
39182
Description
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:
AbstractFileConfiguration.setDefaultPreserveComments(true);
The fix is implemented and tested, attached as a patch file to this bug.
Attachments
Attachments
Issue Links
- incorporates
-
CONFIGURATION-140 [configuration] Header parsing for PropertiesConfiguration
- Closed