Skip to content

Fix detection of immutability in case class with private field #250

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

Conversation

arnaud-daroussin
Copy link
Contributor

@arnaud-daroussin arnaud-daroussin commented May 7, 2025

Hi @novakov-alexey,

As I said in this comment #248 (comment) I found a bug in the detection of the immutability of a case class with private field.

Under some circonstances (I'm not 100% sure) for exemple when a case class with private field is declared after an object, the field name in the java class takes the name className$$fieldName instead of the field name only.

The fix complexifies the field lookup to also handle this case.

@novakov-alexey
Copy link
Collaborator

Great work! Thanks a lot!

@novakov-alexey novakov-alexey merged commit 8acbd50 into flink-extended:master May 11, 2025
6 checks passed
@arnaud-daroussin arnaud-daroussin deleted the fix-immutability-in-serializer branch May 20, 2025 08:08
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