JDK 22 |
---|
22 b16Fixed |
Blocks :
|
|
CSR :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
JDK-8317113 :
|
sun.reflect.ReflectionFactory::newConstructorForSerialization is JDK unsupported API used by 3rd party serialization framework. This API currently generates the bytecode which fails the verification because `new C; invokespecial A()` where the given class `C` and invoke a no-arg constructor of `C`'s first non-`Serializable` superclass `A` is not a valid operation per the VM specification. VM special cases the classes generated for reflection to skip verification for the constructors generated for serialization and externalization. See [1] for details. Reimplementing ReflectionFactory::newConstructorForSerialization with method handles will allow the VM hack to be removed. [1] https://bugs.openjdk.org/browse/JDK-8305104?focusedCommentId=14570146&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14570146
|