ARTEMIS-512 NPEs in LDAP authz

This commit is contained in:
jbertram 2016-05-02 08:40:02 -05:00 committed by Martyn Taylor
parent b863e69eb7
commit 4bab1f0644
2 changed files with 7 additions and 2 deletions

View File

@ -1151,7 +1151,10 @@ public class ConfigurationImpl implements Configuration, Serializable {
@Override
public Map<String, Set<Role>> getSecurityRoles() {
for (SecuritySettingPlugin securitySettingPlugin : securitySettingPlugins) {
securitySettings.putAll(securitySettingPlugin.getSecurityRoles());
Map<String, Set<Role>> securitySettings = securitySettingPlugin.getSecurityRoles();
if (securitySettings != null) {
securitySettings.putAll(securitySettings);
}
}
return securitySettings;
}

View File

@ -398,7 +398,9 @@ public class LegacyLDAPSecuritySettingPlugin implements SecuritySettingPlugin {
}
try {
context.close();
if (context != null) {
context.close();
}
}
catch (NamingException e) {
// ignore