Skip to content
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

try to fix issue where _numberString is used despite having old value #1389

Open
wants to merge 5 commits into
base: 2.19
Choose a base branch
from

Conversation

pjfanning
Copy link
Member

@cowtowncoder
Copy link
Member

Sounds reasonable. But we really need a test or two here, to reproduce the problem and guard against regression. Test in jackson-databind not ideal, but hopefully can be translated to sequence of nextToken()s and number access calls.

@pjfanning
Copy link
Member Author

  • the test that I added seems valid enough but actually works without the code fix
  • I will continue seeing if I can produce a jackson-core that fails without the change
  • this change does seem to work in that it fixes the test in test for issue #4917 jackson-databind#4918

@cowtowncoder
Copy link
Member

@pjfanning I think the difference is that thanks to @JsonCreator, number value will be buffered in TokenBuffer and is probably accessed with JsonParser.getNumberValueDeferred() instead of getDecimalValue().

@pjfanning
Copy link
Member Author

@cowtowncoder the test now reproduces the issue - I put a summary in FasterXML/jackson-databind#4918 (comment)

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.

2 participants