Remove VM implementation that bypass verification for core reflection

XMLWordPrintable

    • Type: CSR
    • Resolution: Approved
    • Priority: P4
    • 24
    • Component/s: core-libs
    • None
    • behavioral
    • low
    • `-Djdk.reflect.useOldSerializableConstructor=true` is an undocumented system property and no customer reports any issue of the new implementation.
    • System or security property
    • Implementation

      Summary

      Remove the undocumented system property -Djdk.reflect.useOldSerializableConstructor=true and the old implementation of sun.reflect.ReflectionFactory::newConstructorForSerialization.

      Problem

      JDK-8315811 reimplements sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles and adds an undocumented system property -Djdk.reflect.useOldSerializableConstructor=true to workaround any issue in JDK 22. This issue proposes to remove the system property and old implementation.

      Solution

      Remove the undocumented system property -Djdk.reflect.useOldSerializableConstructor=true as well as the old implementation of sun.reflect.ReflectionFactory::newConstructorForSerialization.

      Specification

      After this change, setting -Djdk.reflect.useOldSerializableConstructor=true system property has no effect. Note that this system property is undocumented and no documentation needs to be updated.

            Assignee:
            Mandy Chung (Inactive)
            Reporter:
            Mandy Chung (Inactive)
            Alan Bateman, Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: