add the other getProperty(); more tweaks

This commit is contained in:
zzz
2012-10-18 21:07:36 +00:00
parent 0b4401e64b
commit 4f936f958d
5 changed files with 27 additions and 12 deletions

View File

@@ -416,6 +416,25 @@ public class RouterContext extends I2PAppContext {
return super.getProperty(propName, defaultVal);
}
/**
* Return a long with a long default
* @since 0.9.4
*/
@Override
public long getProperty(String propName, long defaultVal) {
if (_router != null) {
String val = _router.getConfigSetting(propName);
if (val != null) {
long rv = defaultVal;
try {
rv = Long.parseLong(val);
} catch (NumberFormatException nfe) {}
return rv;
}
}
return super.getProperty(propName, defaultVal);
}
/**
* @return new Properties with system and context properties
* @since 0.8.4