SEC-817: NPE in org.springframework.security.config.FilterChainProxyPostProcessor

Reversed order of beanName.equals() call as suggested.
This commit is contained in:
Luke Taylor 2008-05-07 13:58:53 +00:00
parent 8ad2d681ab
commit 301d021bf5
3 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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