修复NumberUtilisNumber方法以L结尾没有小数点判断问题(issue#3938@Github)

This commit is contained in:
Looly 2025-05-13 15:02:32 +08:00
parent 0ceed43e2e
commit f0c7b4d8f0
2 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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;