-
-
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
Polymorphic subtypes not registering on copied ObjectMapper (2.11.1) #2785
Comments
Thank you for reporting this, and especially for investigation and fix! It is unfortunate that the fix to copy problem lead to this regression. I'll have a look at PR to verify it (sounds legit). One other thing I will need to be able to merge PR is CLA: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf (unless I have asked and received one earlier; one is good for all contributions) which is easiest to print, fill & sign, scan/photo, email to |
Ok, I emailed the CLA to |
Thank you! I merged PR changes manually, and the fix will be included in 2.11.2 (which unfortunately will take a while as 2.11.1 was just released -- but 2.12.2-SNAPSHOT is available via Sonatype's OSS repo) |
After upgrading to 2.11.1 from 2.11.0, code that uses a copied ObjectMapper, that then registers subtypes does not work.
Take this simple test case:
The above test passes by changing one of two things:
.copy()
from the ObjectMapper lineAlso, I'm aware that the above code does not serialize, but that's not the point right now. I'm just worried about deserialization.
I'm not really sure what the cause is here, but it's something that changed from 2.11.0 to 2.11.1. Maybe it's also affecting other times when the ObjectMapper is copied?
EDIT: This line changed from 2.11.0 to 2.11.1:
jackson-databind/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
Line 560 in 56b4421
This may have been affected by changes from: #2755
The text was updated successfully, but these errors were encountered: