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

Update Headers.java #1714

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

Update Headers.java #1714

wants to merge 2 commits into from

Conversation

ctarnold
Copy link

@ctarnold ctarnold commented Dec 5, 2023

asMap() in zuul/message/Headers.java is related to many operations described as expensive (such as toString, hashing). Add a comment to asMap() to better communicate this high computational complexity.

asMap() in zuul/message/Headers.java is related to many operations described as expensive (such as toString, hashing). Add a comment to asMap() to better communicate this expensive nature.
@kyagna kyagna self-requested a review December 7, 2023 07:52
@@ -581,7 +581,7 @@ public boolean equals(Object obj) {

return asMap().equals(other.asMap());
}

/* asMap is an expensive function, use only when necessary. Avoid calling on a hot path. */
Copy link
Contributor

Choose a reason for hiding this comment

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

couple of nits:

  1. Add a new line before the comment
  2. Can you make the comment multiline as in the next function to be consistent?

Copy link
Author

Choose a reason for hiding this comment

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

Hi @kyagna, thanks for the feedback. I've adopted your suggestions to be more consistent and promote readability.

Style fix. 1. Added new line before asMap comment. 2. Converted asMap comment to a multiline comment.
Copy link

github-actions bot commented Aug 1, 2024

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants