Skip to content

Conversation

@BeomSeogKim
Copy link
Contributor

Fixes: #2995

Replaces the use of parseInt / parseLong in JsonParser.toTypedObject()
with BigDecimal.intValueExact() / longValueExact() to support scientific notation
(e.g., "1.5E7") safely and accurately.

  • Added tests for scientific notation in JsonParserTests

Fixes: spring-projects#2995

Replaces direct parseInt/parseLong with BigDecimal-based parsing to handle
scientific notation safely and accurately.

Signed-off-by: BeomSeogKim <[email protected]>
@ilayaperumalg
Copy link
Member

@BeomSeogKim Thanks for the PR. Rebased and merged as 69c081c

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.

NumberFormatException when model returns scientific notation (e.g., “1.5009969E7”) for int parameter in tool method

2 participants