efegokdemir opened a new pull request, #330: URL: https://github.com/apache/commons-math/pull/330
## Summary Fixes MATH-1688 by preventing the default `ComplexFormat` parser from silently accepting malformed grouping separators as part of numeric values. ## Changes - Disable grouping separators in the default number formats created by `ComplexFormat`. - Add regression coverage for malformed comma placement reported in MATH-1688. - Custom `NumberFormat` instances remain unchanged. ## Testing - `mvn -pl commons-math-legacy -am -Dtest=ComplexFormatTest -Dsurefire.failIfNoSpecifiedTests=false -Djacoco.skip=true test` — passed (44 tests). - `git diff --check` — passed. - `mvn -pl commons-math-legacy -am -DskipTests -Djacoco.skip=true verify` — blocked by the repository's SpotBugs plugin, which does not support the JDK 27 class-file version (`Unsupported class file major version 71`). ## Notes The issue was reproduced on the current upstream branch before the change: malformed inputs such as `,,7+,,,2i` and `7,,8` were accepted. The fix is limited to `ComplexFormat` defaults and does not alter caller-supplied number formats. AI assistance was used during investigation and implementation; the change was reviewed and validated by the submitter. -- 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]
