Skip to content

feat(java): Support customized serializer for abstract or interface. #2311

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

Conversation

CherishCai
Copy link
Contributor

What does this PR do?

Support customized serializer for abstract or interface.
First, cache absClassInfo in extRegistry when setClassInfo if class is abstract or interface.
And then, find that in createSerializer for new type of Class. If match, return the customized (abs)serializer .

Related issues

@CherishCai CherishCai requested a review from chaokunyang as a code owner June 7, 2025 15:16
@CherishCai CherishCai changed the title enhance(java): Support customized serializer for abstract or interface. feat(java): Support customized serializer for abstract or interface. Jun 7, 2025
Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@chaokunyang chaokunyang merged commit c55a1c3 into apache:main Jun 7, 2025
50 of 51 checks passed
chaokunyang added a commit that referenced this pull request Jun 18, 2025
## What does this PR do?

fix register serializer for abstract class

## Related issues

#2345 #2311

## Does this PR introduce any user-facing change?

<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/fory/issues/new/choose) describing the
need to do so and update the document if necessary.
-->

- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?

## Benchmark

<!--
When the PR has an impact on performance (if you don't know whether the
PR will have an impact on performance, you can submit the PR first, and
if it will have impact on performance, the code reviewer will explain
it), be sure to attach a benchmark data here.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants