Open pjfanning opened 2 years ago
One full test stack trace:
java.lang.IllegalAccessError: failed to access class com.fasterxml.jackson.module.afterburner.deser.BasicDeserializeTest$BigBeanWithNonVoidPropertySetter from class com.fasterxml.jackson.module.afterburner.deser.BasicDeserializeTest$BigBeanWithNonVoidPropertySetter$Creator4JacksonDeserializer1ede742a (com.fasterxml.jackson.module.afterburner.deser.BasicDeserializeTest$BigBeanWithNonVoidPropertySetter is in unnamed module of loader 'app'; com.fasterxml.jackson.module.afterburner.deser.BasicDeserializeTest$BigBeanWithNonVoidPropertySetter$Creator4JacksonDeserializer1ede742a is in unnamed module of loader com.fasterxml.jackson.module.afterburner.util.MyClassLoader @55040f2f)
at com.fasterxml.jackson.module.afterburner.deser.BasicDeserializeTest$BigBeanWithNonVoidPropertySetter$Creator4JacksonDeserializer1ede742a.createUsingDefault(com/fasterxml/jackson/module/afterburner/deser/BasicDeserializeTest$BigBeanWithNonVoidPropertySetter$Creator4JacksonDeserializer.java)
at com.fasterxml.jackson.module.afterburner.deser.SuperSonicBeanDeserializer.deserialize(SuperSonicBeanDeserializer.java:136)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4697)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3652)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3620)
at com.fasterxml.jackson.module.afterburner.deser.BasicDeserializeTest.testBigNonVoidProperty(BasicDeserializeTest.java:300)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at junit.framework.TestCase.runTest(TestCase.java:177)
at junit.framework.TestCase.runBare(TestCase.java:142)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:130)
at junit.framework.TestSuite.runTest(TestSuite.java:241)
at junit.framework.TestSuite.run(TestSuite.java:236)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Looks like Java 17 doesn't let inner classes access the non-public state of other inner classes. For instance, this test passes if I make BigBeanWithNonVoidPropertySetter class public instead of package private.
Yes, I can see the failure on 2.14 branch. Not sure what could be done here; I guess an obvious thing would be to avoid generating accessor methods on JDK 17+ for cases determined inaccessible and revert to using default introspection-based (de)serializer access. I forget if there was a way to mix these -- it is possible it is all-or-nothing (that is, either access to all properties is generated or none).
Looks like Blackbird works better, although there is 1 test failure for it too. But probably easier to resolve.
Quick note: JDK 11 tests now pass for CI, leaving the big group of issues for JDK 17.
The CI build builds for Java 8 (ok), Java 11 (small group of failures), Java 17 (lots of afterburner fails -- possibly more issues, the build stops after the afterburner fails).