This commit is contained in:
Looly 2020-09-29 12:08:19 +08:00
parent 2619bdd1df
commit a508533f9c
2 changed files with 5 additions and 1 deletions

View File

@ -30,6 +30,7 @@
* 【core 】 优化NumberUtil中针对BigDecimal的一些处理逻辑pr#1127@Github
* 【core 】 NumberUtil.factorial注释明确pr#1126@Github
* 【core 】 NumberUtil增加isPowerOfTwo方法pr#1132@Github
* 【core 】 优化BooleanUtil的校验逻辑pr#1137@Github
### Bug修复
* 【crypto 】 修复SM2验签后无法解密问题issue#I1W0VP@Gitee

View File

@ -1,7 +1,10 @@
package cn.hutool.core.util;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import java.util.Set;
/**
* Boolean类型相关工具类
*
@ -11,7 +14,7 @@ import cn.hutool.core.convert.Convert;
public class BooleanUtil {
/** 表示为真的字符串 */
private static final Set<String> TRUE_SET = new HashSet<>(Arrays.asList("true", "yes", "y", "t", "ok", "1", "on", "", "", "", "", ""));
private static final Set<String> TRUE_SET = CollUtil.newHashSet("true", "yes", "y", "t", "ok", "1", "on", "", "", "", "", "");
/**
* 取相反值