-
-
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
Jackson does not support deserializing new Java 9 unmodifiable collections #2900
Comments
Ok, had a chance to look a bit into this. I agree with notes on 2 main challenges, but there is also third immediate problem wrt tests: type for
so test would fail even if special handling was added. For now I think I can at least add failing test(s), under |
Quick note: I think changes from #3009 may have helped (or will help), although there is still at least one failure -- but that is the variant problem wrt @TheSpiritXIII would it be easy to test against 2.12.1 to see if the fix mentioned helps? |
Ok, so I fixed the main issue for 2.13.0 and when type id is included The problem wrt test and inclusion -- that implementation types are |
When will 2.13.0 be release? |
Per below, towards end of Q2 or early Q3 ( so June/July 2021) |
Hi, 2.13.0 doesn't seem to work with |
Describe the bug
Java 9 introduced new unmodifiable collection APIs. For instance, List.of.
Today, Jackson has a special deserializer for Collections.unmodifiableList but not for these new classes:
jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/impl/JavaUtilCollectionsDeserializers.java
Line 81 in a64e1bf
Version information
2.11.2
To Reproduce
testJava9UmodifiableList fails. The other 2 pass.
Expected behavior
I would think the new classes are added as additional aliases as candidates for special deserialization.
Unfortunately, I think this is tricky for two reasons:
Source: https://hg.openjdk.java.net/jdk/jdk11/file/1ddf9a99e4ad/src/java.base/share/classes/java/util/List.java#l1031
The text was updated successfully, but these errors were encountered: