mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
修复NumberUtil
isNumber方法以L结尾没有小数点判断问题(issue#3938@Github)
This commit is contained in:
parent
0ceed43e2e
commit
f0c7b4d8f0
@ -1,6 +1,13 @@
|
|||||||
|
|
||||||
# 🚀Changelog
|
# 🚀Changelog
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
# 5.8.39(2025-05-13)
|
||||||
|
|
||||||
|
### 🐣新特性
|
||||||
|
### 🐞Bug修复
|
||||||
|
* 【core 】 修复`NumberUtil`isNumber方法以L结尾没有小数点判断问题(issue#3938@Github)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.38(2025-05-13)
|
# 5.8.38(2025-05-13)
|
||||||
|
|
||||||
|
@ -1266,7 +1266,7 @@ public class NumberUtil {
|
|||||||
}
|
}
|
||||||
if (chars[i] == 'l' || chars[i] == 'L') {
|
if (chars[i] == 'l' || chars[i] == 'L') {
|
||||||
// not allowing L with an exponent
|
// not allowing L with an exponent
|
||||||
return foundDigit && !hasExp;
|
return foundDigit && !hasExp && !hasDecPoint;
|
||||||
}
|
}
|
||||||
// last character is illegal
|
// last character is illegal
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user