This commit is contained in:
Looly 2022-06-23 18:23:21 +08:00
parent 33e95b23c1
commit 7eca54cf08
2 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,7 @@
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
# 5.8.4.M1 (2022-06-20) # 5.8.4.M1 (2022-06-23)
### 🐣新特性 ### 🐣新特性
* 【extra 】 Sftp增加构造重载支持超时pr#653@Gitee * 【extra 】 Sftp增加构造重载支持超时pr#653@Gitee
@ -21,6 +21,7 @@
* 【core 】 修复CsvData.getHeader没有判空导致空指针问题issue#I5CK7Q@Gitee * 【core 】 修复CsvData.getHeader没有判空导致空指针问题issue#I5CK7Q@Gitee
* 【core 】 修复单字母转换为数字的问题issue#I5C4K1@Gitee * 【core 】 修复单字母转换为数字的问题issue#I5C4K1@Gitee
* 【core 】 修复IterUtil.filter无效问题 * 【core 】 修复IterUtil.filter无效问题
* 【core 】 修复NumberUtil传入null返回了true(issue#I5DTSL@Gitee)
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------

View File

@ -2671,6 +2671,9 @@ public class NumberUtil {
* @since 4.6.7 * @since 4.6.7
*/ */
public static boolean isValidNumber(Number number) { public static boolean isValidNumber(Number number) {
if(null == number){
return false;
}
if (number instanceof Double) { if (number instanceof Double) {
return (false == ((Double) number).isInfinite()) && (false == ((Double) number).isNaN()); return (false == ((Double) number).isInfinite()) && (false == ((Double) number).isNaN());
} else if (number instanceof Float) { } else if (number instanceof Float) {