• Type: Sub-task
    • Resolution: Delivered
    • Priority: P4
    • 24
    • Affects Version/s: 24
    • Component/s: core-libs

      New methods have been added to `sun.reflect.ReflectionFactory` to allow custom serialization libraries get `MethodHandle`s to invoke methods that implement the default behavior for serializable classes. The new methods are `defaultReadObjectForSerialization` and `defaultWriteObjectForSerialization`. The method `serialPersistentFields` has also been added to allow custom serialization libraries obtain the `serialPersistentFields` from a serializable class.

       `sun.reflect.ReflectionFactory` is an undocumented API in the `jdk.unsupported` module. It serves as a stop-gap for custom serialization that would otherwise need to break encapsulation to access inaccessible fields.

            Assignee:
            Unassigned
            Reporter:
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: