forked from I2P_Developers/i2p.i2p
add the other getProperty(); more tweaks
This commit is contained in:
@ -1097,7 +1097,7 @@ public class ConsoleUpdateManager implements UpdateManager {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RegisteredUpdater " + updater + " for " + type + ' ' + method + " @pri " + priority;
|
||||
return "RegisteredUpdater " + updater.getClass().getSimpleName() + " for " + type + ' ' + method + " @pri " + priority;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1138,7 +1138,7 @@ public class ConsoleUpdateManager implements UpdateManager {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RegisteredChecker " + checker + " for " + type + ' ' + method + " @pri " + priority;
|
||||
return "RegisteredChecker " + checker.getClass().getSimpleName() + " for " + type + ' ' + method + " @pri " + priority;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,15 +97,10 @@ class NewsFetcher extends UpdateRunner {
|
||||
else
|
||||
get = new EepGet(_context, false, null, 0, 0, _tempFile.getAbsolutePath(), newsURL, true, null, _lastModified);
|
||||
get.addStatusListener(this);
|
||||
long start = _context.clock().now();
|
||||
if (get.fetch()) {
|
||||
String lastMod = get.getLastModified();
|
||||
if (lastMod != null) {
|
||||
_lastModified = lastMod;
|
||||
long lm = RFC822Date.parse822Date(lastMod);
|
||||
if (lm == 0)
|
||||
lm = _context.clock().now();
|
||||
_context.router().saveConfig(NewsHelper.PROP_LAST_CHECKED, Long.toString(lm));
|
||||
}
|
||||
_context.router().saveConfig(NewsHelper.PROP_LAST_CHECKED,
|
||||
Long.toString(start));
|
||||
return;
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
|
@ -125,7 +125,7 @@ public class NewsHelper extends ContentHelper {
|
||||
* @since 0.9.4
|
||||
*/
|
||||
public static boolean shouldShowNews(RouterContext ctx) {
|
||||
long lastUpdated = lastUpdated(ctx);
|
||||
long lastUpdated = lastUpdated(ctx);
|
||||
if (lastUpdated <= 0)
|
||||
return true;
|
||||
long last = ctx.getProperty(PROP_LAST_HIDDEN, 0L);
|
||||
|
Reference in New Issue
Block a user