Skip to content

[GR-60234] Register superclass serialization constructors by default #10213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

graalvmbot
Copy link
Collaborator

All serializable types can now be serialized with all possible constructors, removing the need for the "customTargetConstructorClass" field in reachability-metadata.json. This was evaluated to have only a minimal impact on the resulting image size (see #9679). As an example, the following JSON registration:

{
  "serialization": [
    {
      "type": "fully.qualified.ClassName"
    }
  ]
}

wille become equivalent to:

{
  "serialization": [
    {
      "type": "fully.qualified.ClassName",
      "customTargetConstructorClass": "super.constructor.ClassName"
    }
  ]
}

Calling RuntimeSerialization.register(clazz) will also register all possible serialization constructors, and RuntimeSerialization.registerWithTargetConstructorClass(clazz, constructor) will become functionally equivalent to RuntimeSerialization.register(clazz).

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 3, 2024
@loicottet loicottet self-assigned this Dec 3, 2024
@graalvmbot graalvmbot force-pushed the lottet/GR-60234-serialization-super-constructors branch 6 times, most recently from 1a9649f to bb81235 Compare December 5, 2024 14:56
@graalvmbot graalvmbot force-pushed the lottet/GR-60234-serialization-super-constructors branch from bb81235 to f14510d Compare December 9, 2024 16:27
@graalvmbot graalvmbot closed this Dec 13, 2024
@graalvmbot graalvmbot deleted the lottet/GR-60234-serialization-super-constructors branch December 13, 2024 07:50
@graalvmbot graalvmbot merged commit 6579e43 into master Dec 13, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants