Parse booleans like Config does.

Incorrectly.
This commit is contained in:
Ray J. Greenwell
2014-06-04 10:48:39 -07:00
parent 1e7934d9c8
commit a225726f8c
@@ -190,7 +190,9 @@ public class RuntimeAdjust
return ((Boolean)o).booleanValue(); return ((Boolean)o).booleanValue();
} }
if (o instanceof String) { if (o instanceof String) {
return Boolean.parseBoolean((String)o); // never throws! // Oh my god: this is how Config parses booleans
return !((String)o).equalsIgnoreCase("false");
// What you'd expect: return Boolean.parseBoolean((String)o); // never throws
} }
return _defval; return _defval;
} }