-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Remove Paranamer usage where possible #449
Comments
jackson-module-scala unit tests run ok on OpenJDK 11 - see https://travis-ci.org/github/FasterXML/jackson-module-scala/builds/693266062 - if you provide a reproducible test case, we can look at it |
@pjfanning Thanks for your help! I solved the issue! We have a class like this:
The above code worked in JDK 8 but failed in JDK 11. To make it work, I removed the
|
@zhao-zihao that code you provided is plain java and not scala - do you use scala at all and if not, can you just remove the jackson-module-scala dependency? |
@cowtowncoder it's easy to drop paranamer usage in jackson-module-scala if we replace it with Java8 specific code. With Jackson 3, is it the intention to drop support for Java 7 and below? |
@pjfanning Yes, Jackson 3.0 is Java8+ only at this point and earlier versions will not be supported. There may even be question of requiring some later JDK version, but JDK8 for sure. In addition, every module can decided if they might want to go Java 8 with 2.x as well: some modules do that ( |
Thanks @cowtowncoder, I would favour dropping Java 7 support in jackson-module-scala 2.12.0. I might even try to remove the dependency on jackson-module-paranamer in jackson-module-scala 2.12.0. |
@pjfanning
Then I add back the
JsonAPISerizlizer.java:
|
So, in jackson-module-scala 2.12.0-SNAPSHOT, I have dropped java 7 support (which only affects scala 2.10/2.11 as scala 2.12/2.13 already only supported java 8). I have removed the dependency on jackson-module-paranamer. scala 2.10/2.11 builds still need paranamer as these scala versions build java classes without full java8 support. |
Note: Scala 2.10 support was dropped from Jackson 2.12 so Paranamer dependency only exists for Scala 2.11. |
I am having the original problem right now. My situation is a bit different though. The error started appearing in the Unit Tests after upgrading Play Framework from version 2.7.9 to 2.8.17. This is the unit test method that fails:
Anywhere there is a call of
How can I overcome this? I checked and all jackson dependencies are on 2.11.4 version, which is the direct jackson dependency version for Play 2.8.17 |
@afsilvasantos where is jackson-module-scala in your stacktrace? You seem to be using play-json and play-json does not use jackson-module-scala - it only used plain jackson-databind. Please do not raise this as a jackson-databind issue either - the Jackson team have limited time and will not want to debug Play for you. A Jackson only test case is what is needed if you expect anyone from Jackson team to debug your issue for you. |
I have a project based on scala 2.13, JDK 8, and jackson-module-scala 2.11.0. Recently we upgrade to JDK 11.
Then
jackson-module-scala
throw anIndexOutOfBoundsException
fromBytecodeReadingParanamer
class.I noticed that the
BeanIntrospector.scala
of thejackson-module-scala
import the problematiccom.thoughtworks.paranamer.BytecodeReadingParanamer
, which hasn't get updated since 4 years ago and it only support JDK 8.The text was updated successfully, but these errors were encountered: