fixed finbugs issue due to PR #609

applicationCtx need not be static as the bean is singleton

This closes #622
This commit is contained in:
Rajani Karuturi 2015-07-24 14:52:53 +05:30
parent 090db05821
commit ac9c2a224a

View File

@ -34,7 +34,7 @@ public class LdapUserManagerFactory implements ApplicationContextAware {
private static Map<LdapUserManager.Provider, LdapUserManager> ldapUserManagerMap = new HashMap<>();
static ApplicationContext applicationCtx;
private ApplicationContext applicationCtx;
public LdapUserManager getInstance(LdapUserManager.Provider provider) {
LdapUserManager ldapUserManager;
@ -46,7 +46,7 @@ public class LdapUserManagerFactory implements ApplicationContextAware {
ldapUserManagerMap.put(LdapUserManager.Provider.MICROSOFTAD, ldapUserManager);
}
} else {
//defaults to opendldap
//defaults to openldap
ldapUserManager = ldapUserManagerMap.get(LdapUserManager.Provider.OPENLDAP);
if (ldapUserManager == null) {
ldapUserManager = new OpenLdapUserManagerImpl();