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
ScalaObjectMapper#readValue fails when there's one of the fields is a case class nested in an object in 2.13.0-rc2 #542
Comments
ScalaObjectMapper is deprecated - so it is not a high priority for maintenance. If you want to try a fix, please feel free to submit one. |
I just added b75861c - it passes for me using Scala 2.13.6 and Zulu JDK 11.0.10 - let's see how it fares on the CI/CD build. |
Seems similar to issue in scala/bug#2034 - maybe you could check a newer JDK to see if that helps |
OK, I had time to actually sit down with a repl. It's trickier than I thought–the problem is when the case class is a field. It also doesn't need to be double nested. Here's a repro:
|
I understand, and I'm planning on migrating my company to ClassTagExtensions. However, we were unable to upgrade to 2.12.x because of a bug, so 2.13.x is our first version that has ClassTagExtensions. We would rather upgrade the version, and then switch to ClassTagExtensions as a separate commit, so that if we run into issues, we can tell whether they come from ClassTagExtensions. Would you mind continuing to support ScalaObjectMapper (at least as far as fixing regressions) for scala 2.12.x / 2.13.x for at least a little while until we are able to migrate? |
OK, I tried repro-ing in JDK11, you're right that it's fixed if you do that. However, we will be unable to upgrade to JDK11 anytime soon (it's a work in progress). Can you use an API that's more JDK8-friendly in the meantime? |
this test passes in our CI build on Java 8 - so it could be just a matter of using a more up to data Java 8 install or a different one - https://github.com/FasterXML/jackson-module-scala/runs/3604199825 ran using adopt open jdk 1.8 |
TastyUtil is a new class but Class.getCanonicalName (where this issue occurs) is used in 4 other places in the legacy jackson-module-scala code base - if this was a widespread issue, I would expect there to be lots of people complaining |
@pjfanning I was able to get a consistently failing reproduction case. It seems to fail across 2.11.x, 2.12.x, and 2.13.x. |
Looks like it is failing now in this PR - #543 - I've hacked a potential fix |
Thank you!! I'll try a snapshot build tomorrow. |
It worked, thank you again! |
I haven't had a chance to try a simple reproduction case in my repl yet, but my suspicion is that this would fail:EDIT: Here's an actual repro:
The text was updated successfully, but these errors were encountered: