- 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:
zzz
2012-10-18 14:28:14 +00:00
parent 2b50c5aaf4
commit 0b4401e64b
13 changed files with 145 additions and 76 deletions

View File

@ -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