diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-13 06:23:44 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-13 06:23:44 +0000 |
commit | fa54640cef9d3a6881d5f58a1a88ab9aec439dc1 (patch) | |
tree | c5b65865fcb3ce2e97b3b75aaf3fc4869f804dfd /branches/sca-java-1.x | |
parent | 53925615005cc7b987c67df99a9d2ccb0fe76f37 (diff) |
Fixing NPE if SecurityHandler extension point wasn't initialized properly
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@803789 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationPolicyProviderFactory.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationPolicyProviderFactory.java b/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationPolicyProviderFactory.java index edc3850976..43d13b665a 100644 --- a/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationPolicyProviderFactory.java +++ b/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationPolicyProviderFactory.java @@ -40,7 +40,9 @@ public class LDAPRealmAuthenticationPolicyProviderFactory implements PolicyProvi super(); LDAPSecurityHandlerExtensionPoint securityHandlerExtensionPoint = registry.getExtensionPoint(LDAPSecurityHandlerExtensionPoint.class); - securityHandler = securityHandlerExtensionPoint.getLDAPSecurityHandlers().get(0); + if (securityHandlerExtensionPoint.getLDAPSecurityHandlers().size() > 0) { + securityHandler = securityHandlerExtensionPoint.getLDAPSecurityHandlers().get(0); + } } public Class<LDAPRealmAuthenticationPolicy> getModelType() { |