Skip to content
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

SONARJAVA-5238 Clarify that serialization applies only to non-static fields. #4950

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

tomasz-tylenda-sonarsource
Copy link
Contributor

https://sonarsource.atlassian.net/browse/SONARJAVA-5238

Messages to make fields serializable or transient are created only for non-static fields. We make this explicit to mildly suggest making a field static as a fix for the problem.

An alternative is to change the message to "Make fieldName serializable, transient, or static", but it might be confusing why we suggest making a field static (often, it will not be possible).

@alban-auzeill alban-auzeill merged commit dabf7fb into master Dec 9, 2024
18 checks passed
@alban-auzeill alban-auzeill deleted the tt/serialization-static branch December 9, 2024 09:35
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