Skip to content

Fix Href mutation when adding existing query key - #1843

Open
bskalpavrukshab25-sketch wants to merge 2 commits into
yegor256:masterfrom
bskalpavrukshab25-sketch:fix-href-immutability
Open

bskalpavrukshab25-sketch wants to merge 2 commits into
yegor256:masterfrom
bskalpavrukshab25-sketch:fix-href-immutability

Conversation

@bskalpavrukshab25-sketch

Copy link
Copy Markdown

What this PR changes

  • Fixes a mutation issue in Href.with() when adding a value to an existing query parameter.
  • Copies the existing parameter values before appending the new value.
  • Adds a regression test to verify that the original Href remains unchanged.

Testing

  • mvn -Dtest=HrefTest test
  • mvn test

All tests passed: 630 tests, 0 failures, 0 errors, 4 skipped.

Fixes #1834

@bskalpavrukshab25-sketch

Copy link
Copy Markdown
Author

Hi maintainers,

The local test suite passes successfully (630 tests, 0 failures, 0 errors, 4 skipped).

However, the GitHub Actions Maven workflow failed in BkParallelTest.java, with an HTTP 204 response where HTTP 200 was expected. This test is unrelated to the files changed in this PR.

Could you please check whether this is an intermittent CI failure and rerun the workflow if appropriate?

Thank you!

This branch has not been deployed

No deployments
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.

Href.java mutates the original query when with() adds an existing key

2 participants