From aac96b15b0bc6a99c46a670631a9faaa7c95f355 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Mon, 12 Apr 2010 19:12:04 +0000 Subject: [PATCH] * configstats.jsp: Fix full stats checkbox default --- .../java/src/net/i2p/router/web/ConfigStatsHelper.java | 5 +---- core/java/src/net/i2p/stat/StatManager.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigStatsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigStatsHelper.java index 9712d53f7b..5c22ed1b1e 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigStatsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigStatsHelper.java @@ -139,9 +139,6 @@ public class ConfigStatsHelper extends HelperBase { public boolean getCurrentCanBeGraphed() { return _currentCanBeGraphed; } public String getExplicitFilter() { return _filter; } public boolean getIsFull() { - String f = _context.getProperty(StatManager.PROP_STAT_FULL); - if (f != null && f.equals("true")) - return true; - return false; + return _context.getBooleanPropertyDefaultTrue(StatManager.PROP_STAT_FULL); } } diff --git a/core/java/src/net/i2p/stat/StatManager.java b/core/java/src/net/i2p/stat/StatManager.java index 139c63b1b7..0393d577a3 100644 --- a/core/java/src/net/i2p/stat/StatManager.java +++ b/core/java/src/net/i2p/stat/StatManager.java @@ -39,8 +39,8 @@ public class StatManager { public static final String PROP_STAT_FILTER = "stat.logFilters"; public static final String PROP_STAT_FILE = "stat.logFile"; public static final String DEFAULT_STAT_FILE = "stats.log"; + /** default true */ public static final String PROP_STAT_FULL = "stat.full"; - public static final String DEFAULT_STAT_FULL = "true"; public static final String PROP_STAT_REQUIRED = "stat.required"; /** * These are all the stats published in netDb, plus those required for the operation of @@ -211,7 +211,7 @@ public class StatManager { * @return true if the stat should be ignored. */ public boolean ignoreStat(String statName) { - if (_context.getProperty(PROP_STAT_FULL, DEFAULT_STAT_FULL).equalsIgnoreCase("true")) + if (_context.getBooleanPropertyDefaultTrue(PROP_STAT_FULL)) return false; String required = _context.getProperty(PROP_STAT_REQUIRED, DEFAULT_STAT_REQUIRED); String req[] = required.split(","); -- GitLab