Skip to content

Fixing non-blocking parser reporting incorrect location when fed with non-zero offset #1415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 30, 2025

Conversation

iifawzi
Copy link
Contributor

@iifawzi iifawzi commented Mar 30, 2025

Hello, this PR is an attempt to resolve #1412
The issue with the changed line is that it was double counting the offset as _inputPtr keeps increasing

This change ensures we track the relative position of each token in the JSON input stream, rather than being affected by the absolute array indices used when feeding the data.

@iifawzi iifawzi changed the title Fixing parser incorrect location when fed with non-zero offset Fixing non-blocking parser reporting incorrect location when fed with non-zero offset Mar 30, 2025
@cowtowncoder
Copy link
Member

Thank you! I'll need to double-check change wrt rest of code but sounds legit.

Aside from that, one thing we'd need before merging in the fix is CLA:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

(unless you have sent one earlier)
which is needed before merging the first contribution. Usual way is to print it, fill & sign, scan/photo, email to cla at fasterxml dot com. Once we have it I can proceed and merge the fix.

Thank you in advance!

@iifawzi
Copy link
Contributor Author

iifawzi commented Mar 30, 2025

Thank you! I'll need to double-check change wrt rest of code but sounds legit.

Aside from that, one thing we'd need before merging in the fix is CLA:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

(unless you have sent one earlier) which is needed before merging the first contribution. Usual way is to print it, fill & sign, scan/photo, email to cla at fasterxml dot com. Once we have it I can proceed and merge the fix.

Thank you in advance!

Thank you @cowtowncoder, I forgot to check the guide.
Signed and sent for jackson-core, and will make sure to send separate ones if touching any other projects.

Let me know if I can assist with any further verifications in any other repository.

@cowtowncoder cowtowncoder added the cla-received PR already covered by CLA (optional label) label Mar 30, 2025
Copy link
Member

@cowtowncoder cowtowncoder left a comment

Choose a reason for hiding this comment

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

LGTM

@cowtowncoder cowtowncoder added the 2.19 Issues planned at earliest for 2.19 label Mar 30, 2025
@cowtowncoder cowtowncoder merged commit 596fd82 into FasterXML:2.19 Mar 30, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.19 Issues planned at earliest for 2.19 cla-received PR already covered by CLA (optional label)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More cases of Non-blocking parser reporting incorrect locations when fed with non-zero offset
2 participants