From 5266497eceafeb0fd745a47346af4c92b99f431c Mon Sep 17 00:00:00 2001 From: samskivert Date: Fri, 13 Mar 2009 22:25:53 +0000 Subject: [PATCH] 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 --- src/java/com/samskivert/util/Config.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/com/samskivert/util/Config.java b/src/java/com/samskivert/util/Config.java index e20ebd0b..0217831b 100644 --- a/src/java/com/samskivert/util/Config.java +++ b/src/java/com/samskivert/util/Config.java @@ -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. * *

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); } }