-
-
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
Serialization fails if the type of a value is more generic than the declared type of a field #543
Comments
Test case added in ahgittin@c9d89b4 . It seems the root cause is that |
Sounds like you have found an unexpected edge case here. |
FWIW, added equivalent test to |
I use latest version, and have the same issue while trying to serialize javax.mail.internet.MimeMessaage Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: javax.mail.internet.MimeMessage["session"]->javax.mail.Session["transport"]->com.sun.mail.smtp.SMTPTransport["urlname"]->javax.mail.URLName["url"]) |
@mohanmca what makes you think it is the same problem? It does not look like similar to me. |
FasterXML/jackson-databind#543 was fixed and we have deprecated KvCoderBase and MapCoderBase which were used as work arounds for the issue. ----Release Notes---- [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=112801278
FasterXML/jackson-databind#543 was fixed and we have deprecated KvCoderBase and MapCoderBase which were used as work arounds for the issue. ----Release Notes---- [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=112801278
It seems that serializing an object which has a field with a generic declared type (e.g.
Supplier<Anything>
) fails if that field is set to a value whose type is more generic (e.g. value of typeSupplierComposition<AnotherThing,Anything>
which extendsSupplier<Anything>
).(I will supply a test case illustrating this more precisely!)
The text was updated successfully, but these errors were encountered: