-
-
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
UnwrappingBeanPropertyWriter
incorrectly assumes the found serializer is of type UnwrappingBeanSerializer
#2060
Comments
After checking if the serializer is of this type seems to fix it:
|
@ptahchiev Thank you for reporting this! I'll have a quick look and hopefully verify your fix. Or, remember why cast was thought to be necessary. |
UnwrappingBeanPropertyWriter
incorrectly assumes the found serializer is of type UnwrappingBeanSerializer
@cowtowncoder Thank you for your fix. Do you know any estimated ETA for the next release? |
@cowtowncoder Sorry - i just saw you have released a new version 👍 BTW I just noticed that this code in the same class might also need the same if: |
Oh crap.. I tried the 2.9.6 release and I now I get:
@cowtowncoder can you please reopen this issue? |
Sigh. This is the reason why I usually insist on unit tests before fixing. |
Hi @cowtowncoder when do you plan the 2.9.7 release? |
@ptahchiev Since 2.9.6 was just released, probably 2-3 months from now at least. |
Hello,
I want to add a bunch of attributes to the resulting JSON file so I create my own
StdSerializer
like this:Notice I have overriden the
isUnwrappingSerializer()
method to return true. But now I get this exception:And indeed here:
https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/ser/impl/UnwrappingBeanPropertyWriter.java#L212
you are trying to cast the serializer to
UnwrappingBeanSerializer
which I don't think is correct.The text was updated successfully, but these errors were encountered: