Skip to content

fix: reject partial formatted number parses - #1162

Merged
delei merged 2 commits into
apache:mainfrom
Aias00:fix/numberformat-trailing-garbage-1152
Oct 8, 2026
Merged

delei merged 2 commits into
apache:mainfrom
Aias00:fix/numberformat-trailing-garbage-1152

Conversation

@Aias00

@Aias00 Aias00 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closed: #1152

Summary

  • require DecimalFormat parsing to consume the full input
  • keep configured suffix parsing working

Verification

  • ./mvnw -pl fesod-sheet -Dmaven.test.skip=false -DskipTests=false -Dtest=NumberUtilsTest#test_parseDouble_withFormatRejectsTrailingText+test_parseBigDecimal_withFormatAcceptsConfiguredSuffix test
  • ./mvnw -pl fesod-sheet spotless:check

Signed-off-by: liuhy <liuhongyu@apache.org>

@delei delei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@delei
delei merged commit 022d292 into apache:main Oct 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Formatted numeric parsing silently accepts trailing garbage

2 participants