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

Update to FastDoubleParser v1.0.1 to fix BigDecimal decoding problem #1331

Merged
merged 9 commits into from
Sep 13, 2024

Conversation

pjfanning
Copy link
Member

@pjfanning pjfanning commented Sep 11, 2024

@cowtowncoder
Copy link
Member

As per my note on FasterXML/jackson-databind#4694 I think I'd like to see if there's any chance of getting FDP fix and new version before adding work-arounds.

In the meantime what would be valuable would be (for now) failing test case first, to check fix, guard against regression.

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.

So: makes sense, but will wait for a bit before merging to see if there's any chance to get fix via FDP before 2.18.0 release. Or not.

@cowtowncoder
Copy link
Member

Thank you for clean up @pjfanning ! Will make sure we'll either add this work-around, or upgrade if FDP fix available, before 2.18.0 final.

@pjfanning pjfanning changed the title workaround bug in FastDoubleParser uptake FastDoubleParser v1.0.1 Sep 13, 2024
if (valueStr.length() < 500) {
return new BigDecimal(valueStr);
}
return JavaBigDecimalParser.parseBigDecimal(valueStr);
Copy link
Member Author

Choose a reason for hiding this comment

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

effectively, the same code as the parse(char[]) method but slight optimisation is that we avoid converting to a char array when we call the JavaBigDecimalParser method

@cowtowncoder cowtowncoder merged commit 7902535 into FasterXML:2.18 Sep 13, 2024
9 checks passed
@cowtowncoder cowtowncoder changed the title uptake FastDoubleParser v1.0.1 Update to FastDoubleParser v1.0.1 to fix BigDecimal decoding problem Sep 13, 2024
@pjfanning
Copy link
Member Author

@cowtowncoder The bug is an edge case, is this change worth backporting to 2.17? I'm on the fence.

@pjfanning pjfanning deleted the bigdec-issue branch September 13, 2024 22:20
@cowtowncoder cowtowncoder added this to the 2.17.3 milestone Sep 13, 2024
@cowtowncoder
Copy link
Member

cowtowncoder commented Sep 13, 2024

Merged, backporting in 2.17(.3) -- just the library upgrade tho, not other changes.

Not certain 2.17.3 will be released (not many fixes, this was 3rd) but just in case.

cowtowncoder added a commit that referenced this pull request Sep 13, 2024
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