Skip to content

Update document regarding Stream usage #17219

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 1 commit into
base: main
Choose a base branch
from

Conversation

ngocnhan-tran1996
Copy link
Contributor

Closes gh-17097

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 8, 2025
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks, @ngocnhan-tran1996! Will you please make the language change listed and also move it to https://github.com/spring-projects/spring-security/blob/main/CONTRIBUTING.adoc#code-style

@@ -21,6 +21,8 @@ We welcome your involvement in the Spring Security project.
There are many ways to contribute, including answering questions on Stack Overflow, writing new code, improving existing code, assisting with documentation, developing samples or tutorials, reporting bugs, or simply making suggestions.
For more information, see our https://github.com/spring-projects/spring-security/blob/main/CONTRIBUTING.adoc[Contributing] documentation.

NOTE: Avoid usage of the Stream API for performance reasons. See https://github.com/spring-projects/spring-security/issues/7154[Spring Issue #7154] for more details.
Copy link
Contributor

Choose a reason for hiding this comment

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

This was the old guidance. Let's update the guidance to:

Since the Stream API is https://github.com/spring-projects/spring-security/issues/7154[much slower] than for loops, please use them judiciously.
The team may ask you to change to a for loop if the given code is along a hot path.

@jzheaux jzheaux added in: docs An issue in Documentation or samples type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 17, 2025
@jzheaux jzheaux self-assigned this Jun 17, 2025
@jzheaux jzheaux added this to the 7.0.0-M1 milestone Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Contribution Guidelines regarding Stream usage
3 participants