forked from I2P_Developers/i2p.i2p
- Lots of fixes for notifying when updates and checks are complete
- Fixes for NewsHelper stored timestamps - Add getProperty(String, long) to context for sanity - New methods and types - Logging improvements - Add failsafe TaskCleaner
This commit is contained in:
@ -479,6 +479,26 @@ public class I2PAppContext {
|
||||
return ival;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a long with a long default
|
||||
* @since 0.9.4
|
||||
*/
|
||||
public long getProperty(String propName, long defaultVal) {
|
||||
String val = null;
|
||||
if (_overrideProps != null) {
|
||||
val = _overrideProps.getProperty(propName);
|
||||
if (val == null)
|
||||
val = System.getProperty(propName);
|
||||
}
|
||||
long rv = defaultVal;
|
||||
if (val != null) {
|
||||
try {
|
||||
rv = Long.parseLong(val);
|
||||
} catch (NumberFormatException nfe) {}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a boolean with a boolean default
|
||||
* @since 0.7.12
|
||||
|
Reference in New Issue
Block a user