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

fix: Avoid setting path state in get method [DHIS2-18234] #19636

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

larshelge
Copy link
Member

@larshelge larshelge commented Jan 10, 2025

The getPath method is currently setting the state of the path property. Having a get method set state is bad practice. It may also have unintended consequences. Hibernate will manage the state of the path property value and there should be no need to additionally set it in the get method. A new method updatePath has been added which can be used in tests if necessary.

@larshelge larshelge changed the title fix: Avoid set path state in get method [DHIS2-18234] fix: Avoid setting path state in get method [DHIS2-18234] Jan 10, 2025
@larshelge larshelge merged commit ca8a28b into master Jan 10, 2025
17 checks passed
@larshelge larshelge deleted the org-unit-getpath branch January 10, 2025 15:53
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.

3 participants