mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix bug
This commit is contained in:
@@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user