-
-
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
BigDecimalAsStringSerializer in NumberSerializer throws IllegalStateException in 2.10 #2513
Comments
It could be a bug certainly. It would be great to have a reproduction through a real use case (that is, ideally just serializing a bean with |
And yes, that call looks... very odd. I do not know how this sequence of calls came to be. On test case: looks like this would only be triggered if |
I think test could be added to |
Was able to reproduce, think I can fix it quite easily. |
Great news! Let me know if there is something I can help out with.
sön 20 okt. 2019 kl. 05:21 skrev Tatu Saloranta <notifications@github.com>:
Was able to reproduce, think I can fix it quite easily.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2513?email_source=notifications&email_token=AABNVFIXHTLRIT6WPPT57NTQPPFEXA5CNFSM4JCPJYE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBYBM6Q#issuecomment-544216698>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABNVFMAUHDLLISJFQ36H4DQPPFEXANCNFSM4JCPJYEQ>
.
--
Sent from my phone
|
@johanhaleby I think the only thing would be if you can easily either use 2.10.1-SNAPSHOT or build locally from |
Hi,
I just updated from Jackson (databind) 2.9.7 to 2.10.0 as a part of updating from Spring Boot 2.1.x to 2.2. In my project I depend on jackson-dataformat-hal to generate responses to web requests. After the update to Jackson 2.10 I get the following exception when trying to serialize a field of type
BigDecimal
:If I have a look at
com.fasterxml.jackson.databind.ser.std.NumberSerializer$BigDecimalAsStringSerializer.valueToString
it looks like this:but this method seems to be called from
com.fasterxml.jackson.databind.ser.std.NumberSerializer$BigDecimalAsStringSerializer.isEmpty(NumberSerializer.java:132)
just as the exception implies:The call to
BeanPropertyWriter.serializeAsField(..)
in jackson-dataformat-hal looks like this:where
jgen
is aJsonGenerator
andprovider
is aSerializerProvider
from Jackson 2.10.Could this be a bug in Jackson Databind or is there something else going on?
The text was updated successfully, but these errors were encountered: