RFR: 8315810: Reimplement sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles
Mandy Chung
mchung at openjdk.org
Wed Sep 6 20:04:39 UTC 2023
On Wed, 6 Sep 2023 19:51:07 GMT, ExE Boss <duke at openjdk.org> wrote:
>> What are you referring to "to implement serialization"? It's only used by ReflectionFactory.
>
> It’s called from the implementation of `JavaLangInvokeAccess::serializableConstructor`, which is called by `jdk.internal.reflect.ReflectionFactory::newConstructorForSerialization`, which is called by `java.io.ObjectStreamClass::getSerializableConstructor`:
> https://github.com/openjdk/jdk/blob/86a18f5e2e0825dddb77656b2f43f64684f1464c/src/java.base/share/classes/java/io/ObjectStreamClass.java#L1444-L1446
I see the confusion. `newConstructionForSerialization` is used by serialization, exposed via `sun.reflect.ReflectionFactory`. I may clarify it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15600#discussion_r1317767729
More information about the core-libs-dev
mailing list