From db05a423dcac8944960ed97c76b9d5ed4461a74e Mon Sep 17 00:00:00 2001 From: Looly Date: Thu, 21 Jul 2022 11:55:21 +0800 Subject: [PATCH] fix bug --- .../src/main/java/cn/hutool/core/util/SystemUtil.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hutool-core/src/main/java/cn/hutool/core/util/SystemUtil.java b/hutool-core/src/main/java/cn/hutool/core/util/SystemUtil.java index a6d082813..88d723f37 100644 --- a/hutool-core/src/main/java/cn/hutool/core/util/SystemUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/util/SystemUtil.java @@ -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); } /**