Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8342574

Remove VM implementation that bypass verification for core reflection

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 24
    • 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.

            mchung Mandy Chung
            mchung Mandy Chung
            Alan Bateman, Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: