summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.5/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-22 09:50:17 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-22 09:50:17 +0000
commitcc2ea0f7930417639d29b6c4a3deefc50ae46b5b (patch)
tree09a706975759831766cd4a353a9f6aa70abe6dba /branches/sca-java-1.5/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java
parent3c104f9e8a6bb30b5bcff3ce2b674690063cc993 (diff)
Fix NPE in security policy modules when running some samples
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@777441 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--branches/sca-java-1.5/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/branches/sca-java-1.5/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java b/branches/sca-java-1.5/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java
index dfe72bee36..a540943298 100644
--- a/branches/sca-java-1.5/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java
+++ b/branches/sca-java-1.5/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java
@@ -86,11 +86,13 @@ public class LDAPRealmAuthenticationServicePolicyProvider implements PolicyProvi
List<LDAPRealmAuthenticationPolicy> polices = new ArrayList<LDAPRealmAuthenticationPolicy>();
// FIXME: How do we get a list of effective policySets for a given operation?
for(Operation operation : operations) {
- if (operation.getName().equals(op.getName())) {
- for (PolicySet ps : operation.getPolicySets()) {
- for (Object p : ps.getPolicies()) {
- if (LDAPRealmAuthenticationPolicy.class.isInstance(p)) {
- polices.add((LDAPRealmAuthenticationPolicy)p);
+ if (operation!= null && operation.getName() != null) {
+ if (operation.getName().equals(op.getName())) {
+ for (PolicySet ps : operation.getPolicySets()) {
+ for (Object p : ps.getPolicies()) {
+ if (LDAPRealmAuthenticationPolicy.class.isInstance(p)) {
+ polices.add((LDAPRealmAuthenticationPolicy)p);
+ }
}
}
}