Parse booleans like Config does.
Incorrectly.
This commit is contained in:
@@ -190,7 +190,9 @@ public class RuntimeAdjust
|
||||
return ((Boolean)o).booleanValue();
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user