mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add empty validae
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# 5.6.6 (2021-05-22)
|
# 5.6.6 (2021-05-24)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【cron 】 增加时间轮简单实现
|
* 【cron 】 增加时间轮简单实现
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
* 【core 】 FileUtil.isEmpty不存在时返回true(issue#1582@Github)
|
* 【core 】 FileUtil.isEmpty不存在时返回true(issue#1582@Github)
|
||||||
* 【core 】 PhoneUtil增加中国澳门和中国台湾手机号校检方法(pr#331@Gitee)
|
* 【core 】 PhoneUtil增加中国澳门和中国台湾手机号校检方法(pr#331@Gitee)
|
||||||
* 【db 】 分页查询,自定义sql查询,添加参数(pr#332@Gitee)
|
* 【db 】 分页查询,自定义sql查询,添加参数(pr#332@Gitee)
|
||||||
|
* 【core 】 IdCardUtil.isValidCard增加非空判断
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【core 】 修复XmlUtil中omitXmlDeclaration参数无效问题(issue#1581@Github)
|
* 【core 】 修复XmlUtil中omitXmlDeclaration参数无效问题(issue#1581@Github)
|
||||||
|
@@ -494,10 +494,11 @@ public class ListUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取一个空List
|
* 获取一个空List,这个空List不可变
|
||||||
*
|
*
|
||||||
* @param <T> 元素类型
|
* @param <T> 元素类型
|
||||||
* @return 空的List
|
* @return 空的List
|
||||||
|
* @see Collections#emptyList()
|
||||||
* @since 5.2.6
|
* @since 5.2.6
|
||||||
*/
|
*/
|
||||||
public static <T> List<T> empty() {
|
public static <T> List<T> empty() {
|
||||||
|
@@ -153,6 +153,10 @@ public class IdcardUtil {
|
|||||||
* @return 是否有效
|
* @return 是否有效
|
||||||
*/
|
*/
|
||||||
public static boolean isValidCard(String idCard) {
|
public static boolean isValidCard(String idCard) {
|
||||||
|
if(StrUtil.isBlank(idCard)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
idCard = idCard.trim();
|
idCard = idCard.trim();
|
||||||
int length = idCard.length();
|
int length = idCard.length();
|
||||||
switch (length) {
|
switch (length) {
|
||||||
|
Reference in New Issue
Block a user