mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix bug
This commit is contained in:
parent
32235d3b7e
commit
db05a423dc
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user