Skip to content

[inmutable-collections-update] - Fix bug where we tried to update an …#22

Merged
sergio-soria-bi merged 2 commits intomasterfrom
bugfix/correct-inmutable-collection-modify
Apr 21, 2026
Merged

[inmutable-collections-update] - Fix bug where we tried to update an …#22
sergio-soria-bi merged 2 commits intomasterfrom
bugfix/correct-inmutable-collection-modify

Conversation

@sergio-soria-bi
Copy link
Copy Markdown
Contributor

[inmutable-collections-update] - Fix bug where we tried to update an inmutable collection.

At PlaceholderPostProcessor we are creating a new set of parameters using streams in java. Those streams frameworks create inmutable collections, but we later try to modify them. This cause a 500 error in the app.

…inmutable collection.

At PlaceholderPostProcessor we are creating a new set of parameters using streams in java. Those streams frameworks create inmutable collections, but we later try to modify them.
This cause a 500 error in the app.
private ProvisionAction addParametersItem(ProvisionAction provisionAction, ProvisionActionParameter parameterItem) {
if (parameterItem == null) {
return provisionAction;
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Extract the code outside the else block. This reduces one level of indentation, which improves readability.

@ivan-risueno
Copy link
Copy Markdown

ivan-risueno commented Apr 21, 2026

if (parameterItem == null) {
    return provisionAction;
}

// else block code

…inmutable collection.

At PlaceholderPostProcessor we are creating a new set of parameters using streams in java. Those streams frameworks create inmutable collections, but we later try to modify them.
This cause a 500 error in the app.
@sonarqubecloud
Copy link
Copy Markdown

@sergio-soria-bi sergio-soria-bi merged commit 34e56fa into master Apr 21, 2026
3 checks passed
@sergio-soria-bi sergio-soria-bi deleted the bugfix/correct-inmutable-collection-modify branch April 23, 2026 13:14
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