Henning P. Schmiedehausen wrote:
with this class gone from the 1.0 release; how am I supposed to load a file from the classpath? just use new PropertiesConfiguration(file) and hope that ConfigurationUtils.locate() doesn't match another file by accident?
Hi, yes that's the purpose of the locate() method. Alternatively you can provide your own URL if you want to be sure the right file is selected.
Regarding the locate() method I hesitated to implement a more generic design but I didn't want to start with an over designed solution. The idea was to introduce a Locator interface, a Locator implements a strategy for finding a resource:
public interface Locator {
URL locate(String basepath, String filename);
}Then we would have a ClassPathLocator, a HomeDirectoryLocator, a ChainedLocator, etc... A default locator would be provided but could be overridden, thus you could implement your customized strategy.
Emmanuel Bourg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
