-
Notifications
You must be signed in to change notification settings - Fork 927
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify behavior of
Endpoint#withAttrs
to merge attributes (#5802)
Motivation: It seems inconsistent that `Endpoint#withAttr` merges the attribute to the existing attributes, whereas `Endpoint#withAttrs` simply replaces the previous attributes. I propose that we modify the behavior of `Endpoint#withAttrs` to be aligned with `Endpoint#withAttr`. Additionally, in order to support the previous behavior, I propose a new API `Endpoint#replaceAttrs` be added. I've confirmed that there are no uses of this API at least internally. ref: #5785 (comment) Modifications: - Modified the behavior of `Endpoint#withAttrs` to merge attributes - Added a new API `Endpoint#replaceAttrs` to support the previous behavior Result: - More consistent APIs - Preparation for #5785 <!-- Visit this URL to learn more about how to write a pull request description: https://armeria.dev/community/developer-guide#how-to-write-pull-request-description -->
- Loading branch information
Showing
2 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters