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 值
|
* @return 值
|
||||||
*/
|
*/
|
||||||
public static boolean getBoolean(final String key, final boolean defaultValue) {
|
public static boolean getBoolean(final String key, final boolean defaultValue) {
|
||||||
String value = get(key);
|
final String value = get(key);
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
value = value.trim().toLowerCase();
|
return BooleanUtil.toBoolean(value);
|
||||||
if (value.isEmpty()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Convert.toBool(value, defaultValue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user