-
Notifications
You must be signed in to change notification settings - Fork 6k
Instantiate exceptions lazily #7996
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
Conversation
...ty/oauth2/server/resource/authentication/JwtIssuerReactiveAuthenticationManagerResolver.java
Outdated
Show resolved
Hide resolved
...ty/oauth2/server/resource/authentication/JwtIssuerReactiveAuthenticationManagerResolver.java
Show resolved
Hide resolved
Thanks for the polish, @robotmrv. In preparation for merging, will you make two adjustments to the commit messages, please?
|
@jzheaux no problem |
I see, @robotmrv. The advantage of separating the commits, in this case, is that it clarifies what precisely was needed to fix the issue vs what was a related polish. This can be useful for reference in the future. |
Add lazy Exception instantiation to reduce allocations Fixes spring-projectsgh-7995
@jzheaux, done |
Make defensive collection copy as Collections.unmodifiableCollection does not protect from the source collection direct modification. Use Mono#map instead of Mono#flatMap as it allocates less. Use less operators to reduce allocations. Use lambda parameter instead of outer method parameter in authenticationManagers#computeIfAbsent() to make it non capturing so it could be cached by JVM. Propagate cause for InvalidBearerTokenException.
Thanks, @robotmrv! This is now merged into |
Add lazy Exception instantiation and reduce amount of
reactor operators to reduce allocations
Fixes gh-7995