diff --git a/core/src/main/java/org/springframework/security/config/FilterChainProxyPostProcessor.java b/core/src/main/java/org/springframework/security/config/FilterChainProxyPostProcessor.java index df3dc25335..41e281f8a3 100644 --- a/core/src/main/java/org/springframework/security/config/FilterChainProxyPostProcessor.java +++ b/core/src/main/java/org/springframework/security/config/FilterChainProxyPostProcessor.java @@ -44,7 +44,7 @@ public class FilterChainProxyPostProcessor implements BeanPostProcessor, BeanFac private ListableBeanFactory beanFactory; public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { - if(!beanName.equals(BeanIds.FILTER_CHAIN_PROXY)) { + if(!BeanIds.FILTER_CHAIN_PROXY.equals(beanName)) { return bean; } diff --git a/core/src/main/java/org/springframework/security/config/MethodSecurityInterceptorPostProcessor.java b/core/src/main/java/org/springframework/security/config/MethodSecurityInterceptorPostProcessor.java index 4485f2ab0f..5324c2acd1 100644 --- a/core/src/main/java/org/springframework/security/config/MethodSecurityInterceptorPostProcessor.java +++ b/core/src/main/java/org/springframework/security/config/MethodSecurityInterceptorPostProcessor.java @@ -23,7 +23,7 @@ public class MethodSecurityInterceptorPostProcessor implements BeanPostProcessor private BeanFactory beanFactory; public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { - if(!beanName.equals(BeanIds.METHOD_SECURITY_INTERCEPTOR)) { + if(!BeanIds.METHOD_SECURITY_INTERCEPTOR.equals(beanName)) { return bean; } diff --git a/core/src/main/java/org/springframework/security/config/RememberMeServicesInjectionBeanPostProcessor.java b/core/src/main/java/org/springframework/security/config/RememberMeServicesInjectionBeanPostProcessor.java index 9768a81107..b6cb81b72d 100644 --- a/core/src/main/java/org/springframework/security/config/RememberMeServicesInjectionBeanPostProcessor.java +++ b/core/src/main/java/org/springframework/security/config/RememberMeServicesInjectionBeanPostProcessor.java @@ -33,7 +33,7 @@ public class RememberMeServicesInjectionBeanPostProcessor implements BeanPostPro logger.info("Setting RememberMeServices on bean " + beanName); pf.setRememberMeServices(getRememberMeServices()); } - } else if (beanName.equals(BeanIds.BASIC_AUTHENTICATION_FILTER)) { + } else if (BeanIds.BASIC_AUTHENTICATION_FILTER.equals(beanName)) { // NB: For remember-me to be sent back, a user must submit a "_spring_security_remember_me" with their login request. // Most of the time a user won't present such a parameter with their BASIC authentication request. // In the future we might support setting the AbstractRememberMeServices.alwaysRemember = true, but I am reluctant to