Don't default to using inherited properties in Config as no one ever used that

and it's of dubious value anyway. I'd ditch ConfigUtil.loadInheritedProperties
entirely to protect future generations from this madness except we use it in
Nenya for loading inherited sound configuration.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2535 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-03-13 22:25:53 +00:00
parent 1fd549ddbb
commit 5266497ece
+6 -6
View File
@@ -31,9 +31,9 @@ import java.util.Properties;
import static com.samskivert.Log.log;
/**
* The config class provides a unified interaface to application configuration information. It
* takes care of loading properties files (done via the classpath) and allows for overriding and
* inheriting of properties values (see {@link ConfigUtil#loadInheritedProperties}).
* The config class provides a unified interaface to application configuration information. See
* {@link PrefsConfig} for an extension of Config that allows the default values to be reconfigured
* and saved persistently.
*
* <p> A common pattern is to create, for each package that shares configuration information, a
* singleton class containing a config object that is configured to load its data from a single
@@ -97,13 +97,13 @@ public class Config
String ppath = path + PROPS_SUFFIX;
// load the properties file
ConfigUtil.loadInheritedProperties(ppath, _props);
ConfigUtil.loadProperties(ppath, getClass().getClassLoader(), _props);
} catch (FileNotFoundException fnfe) {
log.debug("No properties file found to back config [path=" + path + "].");
log.debug("No properties file found to back config", "path", path);
} catch (IOException ioe) {
log.warning("Unable to load configuration [path=" + path + ", ioe=" + ioe + "].");
log.warning("Unable to load configuration", "path", path, "ioe", ioe);
}
}