forked from I2P_Developers/i2p.i2p
add the other getProperty(); more tweaks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user