Boolean.parseBoolean() was apparently introduced in 1.5. Yay for orthogonality.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3872 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -92,12 +92,8 @@ public class DatabaseConfigRegistry extends ConfigRegistry
|
|||||||
|
|
||||||
protected boolean getValue (String field, boolean defval) {
|
protected boolean getValue (String field, boolean defval) {
|
||||||
String value = (String)_data.get(field);
|
String value = (String)_data.get(field);
|
||||||
try {
|
if (value != null) {
|
||||||
if (value != null) {
|
return "true".equalsIgnoreCase(value);
|
||||||
return Boolean.parseBoolean(value);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
// ignore bogus values and return the default
|
|
||||||
}
|
}
|
||||||
return defval;
|
return defval;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user