This commit is contained in:
Looly 2022-07-21 11:55:21 +08:00
parent 32235d3b7e
commit db05a423dc

View File

@ -89,17 +89,12 @@ public class SystemUtil {
* @return
*/
public static boolean getBoolean(final String key, final boolean defaultValue) {
String value = get(key);
final String value = get(key);
if (value == null) {
return defaultValue;
}
value = value.trim().toLowerCase();
if (value.isEmpty()) {
return true;
}
return Convert.toBool(value, defaultValue);
return BooleanUtil.toBoolean(value);
}
/**