Skip to content

[HZG-381] Mutable interceptor #1704

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shultseva
Copy link
Contributor

Added information that the input arguments of the interceptor are mutable.

@shultseva shultseva requested a review from a team as a code owner May 19, 2025 13:05
Copy link

netlify bot commented May 19, 2025

Deploy Preview for hardcore-allen-f5257d ready!

Name Link
🔨 Latest commit c43409a
🔍 Latest deploy log https://app.netlify.com/projects/hardcore-allen-f5257d/deploys/682b36f82615840008cbd99e
😎 Deploy Preview https://deploy-preview-1704--hardcore-allen-f5257d.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@Rob-Hazelcast Rob-Hazelcast left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@JamesHazelcast JamesHazelcast added the backport to all versions Backport commits to maintenance branches (from main) label May 19, 2025
@@ -247,6 +247,8 @@ Map interceptors are chained, so adding the same interceptor to the same map mor
When you add the interceptor in this way, be sure to implement the `hashCode()` method to return the same value for every instance of the interceptor.
It is not strictly necessary, but it is a good idea to also implement `equals()` as this ensures that the map interceptor can be removed reliably.

Input values in interceptors are mutable, which means that if you modify the input value in one interceptor, the next interceptor in the chain will receive the updated value. This will also affect any subsequent processing. It's therefore best to avoid modifying the input value directly.
Copy link
Member

Choose a reason for hiding this comment

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

Can we also include the reason why we are keeping it mutable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport to all versions Backport commits to maintenance branches (from main)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants