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 @Override
public Map<String, Set<Role>> getSecurityRoles() { public Map<String, Set<Role>> getSecurityRoles() {
for (SecuritySettingPlugin securitySettingPlugin : securitySettingPlugins) { for (SecuritySettingPlugin securitySettingPlugin : securitySettingPlugins) {
securitySettings.putAll(securitySettingPlugin.getSecurityRoles()); Map<String, Set<Role>> securitySettings = securitySettingPlugin.getSecurityRoles();
if (securitySettings != null) {
securitySettings.putAll(securitySettings);
}
} }
return securitySettings; return securitySettings;
} }

View File

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