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

Make new download objects instead of changing input referenced object #411

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

rafahop
Copy link
Contributor

@rafahop rafahop commented Feb 27, 2023

What

The Metadata object is populated with a reference to the Downloads field of the version passed as a parameter. Only to then override the downloads Public and Private fields, meaning that we are changing the version (input).
This is not a problem currently as the caller of these methods do not do anything with the version but it could potentially result in unexpected results (and wrong unit tests)

Create new download objects using the version values instead, making it more explicit

How to review

Ensure changes do not alter the logic (other than not overriding the input object) and unit tests still pass

Who can review

Anyone

@rafahop rafahop force-pushed the feature/do-not-change-input-version branch from ef1e5b7 to 4cdf238 Compare March 2, 2023 16:11
@rafahop rafahop merged commit 4cdf238 into develop Mar 7, 2023
@rafahop rafahop deleted the feature/do-not-change-input-version branch March 7, 2023 10:30
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