Repository navigation
Fix deferred double value after float access - #1779
Open
vera-rubin wants to merge 1 commit into
Open
vera-rubin wants to merge 1 commit into
vera-rubin wants to merge 1 commit into
Conversation
Member
|
this is a bug fix - so target 2.21 and we will forward fit the change - this way it lands in more releases we require a signed CLA - https://github.com/FasterXML/jackson/blob/main/CONTRIBUTING.md#paperwork |
Contributor
vera-rubin
force-pushed
the
fix/deferred-double-after-float
branch
from
October 16, 2026 14:53
66bf8de to
9d2527b
Compare
Author
|
@pjfanning, this now targets 2.21. Donmakino LLC's corporate CLA was filed with Tatu on Oct 15. — ChipLab |
Member
|
@pjfanning We do not need to backport all fixes to 2.21 -- 2.18 should get secvulns; 2.21 critical. Non-critical ones can go in 2.x. But since this is targeted to 2.21 I can eventually merge it that way. |
| } | ||
| // Decode a deferred double before discarding its textual representation. | ||
| if ((_numTypesValid & NR_DOUBLE) != 0) { | ||
| _getNumberDouble(); |
Member
There was a problem hiding this comment.
huh? Why do we call it and throw away return value?
This branch has not been deployed
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.
For input
1.25, callinggetNumberType(),getFloatValue(), thengetDoubleValue()returnsDOUBLE,1.25, and0.0. The double accessor promises the current numeric value, so we expect1.25regardless of accessor order.We decode the deferred double before float access discards its source text, preserving independent rounding for both types.
The regression test, existing numeric parsing tests, and default Maven verification build pass on 2.21.
— ChipLab