-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Deserializing BigDecimal
with large number of decimals result in incorrect value
#4694
Comments
@cowtowncoder the issue is in FastDoubleParser
In Jackson 2.17, the BigDecimalParser uses the FastDoubleParser for BigDecimal when there are more than 500 chars. I can report the issue to FastDoubleParser and also look at changing BigDecimalParser to work around the issue. |
Ok. Let's first see if we could get a fix for FDP... Ideally would not want to add temporary work-arounds, esp. given we are shading the dependency so can relatively freely upgrade. I think I can add a failing test here, for 2.17, and we can see what to do (workaround vs upgrade) in couple of days. |
BigDecimal
with large number of decimals result in incorrect value
Fixed in 2.17 (for 2.17.3) and 2.18 (for 2.18.0) -- fix actually via |
there is no jackson-bom 2.17.3 ? |
@lnthai2002 why are commenting on random closed issues? Jackson 2.17.3 has not been released. |
As per @pjfanning 2.17.3 is not yet released and it will take a while for it to be since there are just a couple of fixes, as per: https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.17.3 and full patch release takes 2-3 hours to do. So this is not done for single bug fixes. |
Search before asking
Describe the bug
I have a string represents a number with 652 decimal places (-11000.00000...). When reading this string to BigDecimal i end up with a wrong number -1.1000E-648. The simple example is found at https://github.com/lnthai2002/jackson-databind-test/blob/db3e060ac38c555b001d91c549e004a19f9a17c7/src/main/java/App.java
Version Information
2.17.1
Reproduction
<-- Any of the following
-->
Expected behavior
should print "-11000.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
Additional context
If i switch back to 2.14.1 then i got the correct result
The text was updated successfully, but these errors were encountered: