DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31119>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31119 [configuration] Configuration type conversion Summary: [configuration] Configuration type conversion Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Currently there is no easy way to change the format used to store file based configurations, a XML configuration cannot be saved as a properties file. One has to copy manually all the properties to a new configuration. Oliver Heger suggested separating the persistence mechanism from the Configuration objects. For example: Configuration config = XMLConfigurationLoader.load("config.xml"); PropertiesConfigurationWriter.save(config, "config.properties"); An other way is to provide a method to copy all the properties from a configuration to another one, either as a copy(Configuration, Configuration) method in ConfigurationUtils, as an addAll(Configuration) method in the Configuration interface or as a special constructor: Configuration config = new XMLConfiguration("config.xml"); Configuration config2 = new PropertiesConfiguration(config); config2.save("config.properties"); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
