-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove internal Optional usage in favor of null checks #7155
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
Comments
Hi @rwinch, do you think this is good for |
Thanks for asking @eddumelendez I think it is likely a lot of code to touch for a first timers. |
krisztian-toth
added a commit
to krisztian-toth/spring-security
that referenced
this issue
Aug 22, 2019
krisztian-toth
added a commit
to krisztian-toth/spring-security
that referenced
this issue
Aug 22, 2019
…ster' of https://github.com/watsta/spring-security into spring-projectsgh-7155-remove-optional-usage # Conflicts: # oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/web/reactive/function/client/ServerOAuth2AuthorizedClientExchangeFilterFunction.java
eleftherias
pushed a commit
that referenced
this issue
Aug 26, 2019
As mentioned in the PR, Optional is still being used in the following files:
|
kostya05983
pushed a commit
to kostya05983/spring-security
that referenced
this issue
Aug 26, 2019
This was referenced Apr 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
While some prefer the readability of using the Optional API, the GC overhead of creating additional objects (including intermediate objects) can cause significant decrease in performance There are some simple benchmarks that illustrate the problem.
We should replace Optional usage with null checks throughout Spring Security's code base.
Related gh-7154
The text was updated successfully, but these errors were encountered: