diff --git a/web/src/main/java/org/springframework/security/web/authentication/AnonymousAuthenticationFilter.java b/web/src/main/java/org/springframework/security/web/authentication/AnonymousAuthenticationFilter.java index 55f3b9edf0..c55aca82ab 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/AnonymousAuthenticationFilter.java +++ b/web/src/main/java/org/springframework/security/web/authentication/AnonymousAuthenticationFilter.java @@ -123,7 +123,7 @@ public class AnonymousAuthenticationFilter extends GenericFilterBean implements else { if (this.logger.isTraceEnabled()) { this.logger.trace(LogMessage.of(() -> "Did not set SecurityContextHolder since already authenticated " - + this.securityContextHolderStrategy.getContext().getAuthentication())); + + currentAuthentication)); } } return currentContext;