ARTEMIS-512 NPEs in LDAP authz
This commit is contained in:
parent
b863e69eb7
commit
4bab1f0644
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -398,7 +398,9 @@ public class LegacyLDAPSecuritySettingPlugin implements SecuritySettingPlugin {
|
|||
}
|
||||
|
||||
try {
|
||||
context.close();
|
||||
if (context != null) {
|
||||
context.close();
|
||||
}
|
||||
}
|
||||
catch (NamingException e) {
|
||||
// ignore
|
||||
|
|
Loading…
Reference in New Issue