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

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