/** * Returns the configuration property with the specified key (or the * specified default value if there is no such property). * <p/> * If the property is not defined in this configuration, the code will * lookup the property in the parent configuration. * * @param key the property key. * @param defaultValue the default value. * @return the property value. */ public String getConfigProperty(final String key, final String defaultValue) { String value = this.configuration.getProperty(key); if (value == null) { if (isRootConfig()) { value = defaultValue; } else { value = this.parentConfiguration.getConfigProperty(key, defaultValue); } } return value; }
/** * Returns the configuration property with the specified key (or the * specified default value if there is no such property). * <p> * If the property is not defined in this configuration, the code will * lookup the property in the parent configuration.</p> * * @param key the property key. * @param defaultValue the default value. * @return the property value. */ public String getConfigProperty(final String key, final String defaultValue) { String value = this.configuration.getProperty(key); if (value == null) { if (isRootConfig()) { value = defaultValue; } else { value = this.parentConfiguration.getConfigProperty(key, defaultValue); } } return value; }
/** * Returns the configuration property with the specified key (or the * specified default value if there is no such property). * <p/> * If the property is not defined in this configuration, the code will * lookup the property in the parent configuration. * * @param key the property key. * @param defaultValue the default value. * @return the property value. */ public String getConfigProperty(final String key, final String defaultValue) { String value = this.configuration.getProperty(key); if (value == null) { if (isRootConfig()) { value = defaultValue; } else { value = this.parentConfiguration.getConfigProperty(key, defaultValue); } } return value; }