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

Use computeIfAbsent to simplify getSessionAttributesHandler() #24386

Conversation

hyeonisism
Copy link
Contributor

It can simplify using computeIfAbesnt.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 17, 2020
@rstoyanchev rstoyanchev self-assigned this Feb 3, 2020
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 3, 2020
@rstoyanchev rstoyanchev added this to the 5.2.4 milestone Feb 3, 2020
@rstoyanchev rstoyanchev changed the title Simplify getSessionAttributesHandler() method Use computeIfAbsent to simplify getSessionAttributesHandler() Feb 3, 2020
@rstoyanchev
Copy link
Contributor

I revised this further to remove the surrounding synchronized block since computeIfAbsent on ConcurrentHashMap is already synchronized internally.

@hyeonisism hyeonisism deleted the Simplify-use-compute-if-absent branch February 9, 2020 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants