Apply number-length validator on streaming integer path of async parser#1611
Merged
cowtowncoder merged 5 commits intoMay 20, 2026
Merged
Conversation
The non-blocking parser's NOT_AVAILABLE exits in the integer parsing branch did not invoke the same length validator that the sync parser and the async fraction path already use. This patch applies the existing _setIntLength helper at those exits so maxNumberLength is enforced consistently across sync and async parsers. Signed-off-by: tonghuaroot <tonghuaroot@gmail.com>
Closed
Member
|
@tonghuaroot Looks good so far. One thing before I can merge: CLA from https://github.com/FasterXML/jackson/blob/main/CLA-jackson-2026.pdf (unless you have sent one already; only need to be sent once, good for all future prs). The usual way is to print it, fill & sign, scan/photo, email to |
Contributor
Author
|
@cowtowncoder Signed CLA emailed to cla@fasterxml.com just now. Thanks! |
cowtowncoder
approved these changes
May 20, 2026
pjfanning
reviewed
May 20, 2026
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| java_version: ['8', '11', '17', '21', '25'] |
Member
There was a problem hiding this comment.
Java 11 was an LTS, just as much as Java 8 was an LTS but both are no longer supported
Member
There was a problem hiding this comment.
Member
There was a problem hiding this comment.
Oh. I stand corrected. Will put it back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aligns the async non-blocking parser's integer-path
NOT_AVAILABLEexits with the length-validation idiom already used by the sync paths and the async fraction path, somaxNumberLengthis enforced consistently across sync and async parsers.The change reuses the existing
_setIntLengthhelper at each of the integer-path streaming-suspension points inNonBlockingUtf8JsonParserBase(_startPositiveNumber(int),_startNegativeNumber(),_startPositiveNumber()no-arg,_finishNumberIntegralPart()).Tests
AsyncNumberLengthConsistencyTestpins both the integer- and fraction-path streaming behavior under digit-only chunks.mvn test: 1437 tests run, 0 failures, 0 errors, 2 skipped (pre-existing).Happy to reword / split / amend per maintainer preference.