Akshat-coder2106 opened a new pull request, #1527: URL: https://github.com/apache/commons-lang/pull/1527
**JIRA Ticket:** https://issues.apache.org/jira/browse/LANG-1729 **Description:** Fixed a bug where `NumberUtils.isParsable()` and `NumberUtils.isDigits()` returned `true` for Fullwidth Unicode digits (e.g., `\uFF11` '1'), causing `Double.parseDouble()` to unexpectedly throw a `NumberFormatException`. **Changes:** - Updated `isDigits(String)` to strictly check for ASCII digits ('0'-'9') instead of relying on `Character.isDigit()`, which permits Fullwidth digits. - Updated `withDecimalsParsing(String, int)` (used by `isParsable`) to strictly check for ASCII digits. - Added a new regression test `testIsParsableLang1729` to `NumberUtilsTest.java` which asserts that Fullwidth digits are now rejected (returning `false`). - Disabled/Updated conflicting tests (`testLang1729IsParsableByte`, etc.) that were asserting the previous incorrect behavior. **AI Disclosure:** I used Google Gemini to assist in identifying the correct validation logic (replacing `Character.isDigit` with strict ASCII range checks) and to draft the regression test case. I have manually verified the code and tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
