-
-
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
JDK Serializing and using Deserialized ObjectMapper
loses linkage back from JsonParser.getCodec()
#2038
Comments
Could you include relevant class(es) from the zip here? Exception suggests that linkage between |
There is only one file... NewClassTest.java |
Ok good luck. I hope someone has time to look into this. |
Do you know who can help? I found out what change in jackson-core between 2.2.0 and 2.2.1 broke this feature. But then I see recently (since late 2017) there has been a lot of refactoring to the code done by you; I can no longer do the mapping between the old code and the new code. |
That is a very, very old version. If you had added that one class in there, I would have looked at this earlier. Looking at package now code looks ok, and I guess its JDK serialization that does something odd. But instead of requiring use of JsonNode n = context.readTree(jp);
JsonParser p2 = n.asParser();
MyType value = context.readValue(p2, MyType.class);
p2.close(); Hope this helps. |
Also: I think what you found is a bug, hope to find time to fix it if possible at some point. |
I tried to follow the comment with the code above with 2.9.5 version, but I am stuck at the first line itself.
I did not find |
btw - it seems this fixes the issue on top of jackson-core-2.9.5 :
|
@243826 Whoa. That seems like an ... interesting oversight :) I'll want to add a regression test for this, since serializability of As to |
ObjectMapper
loses linkage back from JsonParser.getCodec()
Ok. So. Will be fixed in |
Hi, kindly make a release ASAP. I have been waiting eagerly. :-)
…On Wednesday, May 16, 2018, Tatu Saloranta ***@***.***> wrote:
Ok. So. Will be fixed in 2.9.6, to be released within a week or two
(before end of May).
It may still make sense to avoid the problem for this particular case.
Thank you again for reporting and tracking down the problem. Interesting
bug survived this long :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2038 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACk9w8oqZypiPJDWMQPMnNqDO7ZuPL2Yks5tzF-ggaJpZM4UADK8>
.
--
Chetan
|
I could reproduce this with version 2.9.7 |
@mserdur A reproduction would be needed to show how things do not work. And if so, please file a new issue: release notes unfortunately do not work well with re-opened issues. |
I am attaching a test project which is linked against 2.9.5 version. The test errors out. But if I change the pom to link against 2.2.0, it passes. It seems that this is broken since 2.2.1.
SerializedObjectMapper.zip
The text was updated successfully, but these errors were encountered: