activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-512 NPEs in LDAP authz
Date Tue, 03 May 2016 13:22:47 GMT
ARTEMIS-512 NPEs in LDAP authz


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/4bab1f06
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/4bab1f06
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/4bab1f06

Branch: refs/heads/master
Commit: 4bab1f06442fc27770d03b18af61c23168a30d52
Parents: b863e69
Author: jbertram <jbertram@apache.org>
Authored: Mon May 2 08:40:02 2016 -0500
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Tue May 3 14:22:32 2016 +0100

----------------------------------------------------------------------
 .../activemq/artemis/core/config/impl/ConfigurationImpl.java    | 5 ++++-
 .../core/server/impl/LegacyLDAPSecuritySettingPlugin.java       | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4bab1f06/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
index 8b898b0..bedfa56 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
@@ -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;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4bab1f06/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java
index 60fa632..6a0710a 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java
@@ -398,7 +398,9 @@ public class LegacyLDAPSecuritySettingPlugin implements SecuritySettingPlugin
{
       }
 
       try {
-         context.close();
+         if (context != null) {
+            context.close();
+         }
       }
       catch (NamingException e) {
          // ignore


Mime
View raw message