http://forums.lfjr.net/commons-configuration-refactored.zip
It's not fully tested yet but I wanted to share it as soon as possible to get your feedback. This version doesn't include the latest patchs:
Here are the changes:
- added a new method locate() in ConfigurationUtils. this method locates a file by looking in the base directory, in the user hom directory, in the context classpath and in the system classpath (should fix bug 29036 and 30856)
- added a FileConfiguration interface defining the methods for loading and saving a file based configuration. A configuratioon can be loaded from an URL, a File, an InputStream or a Reader.
- added an AbstractFileConfiguration implementing everything in FileConfiguration but load(Reader) and save(Writer). The load() method delegates to ConfigurationUtils.locate() to find the configuration.
- made PropertiesConfiguration and XMLConfiguration extend AbstractFileConfiguration
- merged BasePropertiesConfiguration and PropertiesConfiguration
- removed ClassPropertiesConfiguration since its loading stategy is now implemented in ConfigurationUtils.locate()
- HierarchicalXMLConfiguration implements directly FileConfiguration since it inherits from HierachicalConfiguration. The methods are not fully implemented yet
- removed BasePathConfiguration and BasePathLoader
- added a jar in conf/ to test loading files from a jar. XMLConfiguration passed the test (bug 30702 fixed)
Emmanuel Bourg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]