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

Simple check to prevent frozen class modification #6434

Merged
merged 2 commits into from
Jul 1, 2022

Conversation

BillCarsonFr
Copy link
Member

Type of change

  • Technical

Quick technical change to add a check to prevent the modification of some serializable classes.
Historically megolm session where serialized using java serialization mechanism but without proper version. Any change to those class will make it impossible for the app to load saved session.

This change adds a check to fail when such frozen class is modified.

@BillCarsonFr
Copy link
Member Author

@bmarty Adding you as reviewer, not sure if it's the best place/way to do that.

@BillCarsonFr BillCarsonFr requested a review from bmarty July 1, 2022 10:01
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM, I assume that you have checked the error. I will create a 2 PRs to test again.

This check could be a good candidate for Danger, but the tool is not yet setup in the project. We will migrate this check later.

@bmarty bmarty merged commit 93b7e10 into develop Jul 1, 2022
@bmarty bmarty deleted the feature/bca/check_serialized_frozen branch July 1, 2022 16:01
@bmarty bmarty changed the title Simple check to prevent frozen class modificaiton Simple check to prevent frozen class modification Jul 1, 2022
@bmarty bmarty mentioned this pull request Aug 16, 2022
15 tasks
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