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

Introduce WritablePropertyMap #5893

Merged
merged 6 commits into from
Oct 1, 2024
Merged

Introduce WritablePropertyMap #5893

merged 6 commits into from
Oct 1, 2024

Conversation

labkey-adam
Copy link
Contributor

@labkey-adam labkey-adam commented Sep 27, 2024

Rationale

Currently, PropertyMap is a mutable Map that also offers delete(), save(), etc., even for property maps that should be read-only. This is poor practice and has led to caching issues and bugs like https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=48993

A better approach is to make PropertyMap read-only (immutable) and introduce WritablePropertyMap, which allows map mutation (e.g., put(), remove()) and implements delete(), save(), etc. Property maps are used in many repositories, so this initial PR introduces the new class without yet splitting out our persistence methods. Once all repos are converted to use the new class we'll move those methods.

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