Skip to content

fix: reject out-of-range integral cell values - #1101

Open
nkuprins wants to merge 3 commits into
apache:mainfrom
nkuprins:fix/integral-number-overflow
Open

nkuprins wants to merge 3 commits into
apache:mainfrom
nkuprins:fix/integral-number-overflow

Conversation

@nkuprins

Copy link
Copy Markdown
Contributor

Closed: #1100

Purpose of the pull request

As title.

What's changed?

  • Integer converters and NumberUtils.parseByte/parseShort/parseInteger/parseLong now range-check the value before narrowing, so out-of-range values throw instead of wrapping around.
  • The integer parse* methods now call parseBigDecimal, which already has the hasFormat branch.
  • Added out-of-range tests to ConverterTest and NumberUtilsTest.

Checklist

  • I have read the Contributor Guide.
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

@nkuprins
nkuprins marked this pull request as ready for review September 15, 2026 08:36
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] Integer, Long, Short and Byte fields return wrong values when a cell is out of range

1 participant