summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.5/modules/policy-security
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
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 'branches/sca-java-1.5/modules/policy-security')
-rw-r--r--branches/sca-java-1.5/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationServicePolicyProvider.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/branches/sca-java-1.5/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationServicePolicyProvider.java b/branches/sca-java-1.5/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationServicePolicyProvider.java
index 19b7d00127..56927be6bb 100644
--- a/branches/sca-java-1.5/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationServicePolicyProvider.java
+++ b/branches/sca-java-1.5/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationServicePolicyProvider.java
@@ -57,11 +57,13 @@ public class JaasAuthenticationServicePolicyProvider implements PolicyProvider {
List<JaasAuthenticationPolicy> polices = new ArrayList<JaasAuthenticationPolicy>();
// 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 (JaasAuthenticationPolicy.class.isInstance(p)) {
- polices.add((JaasAuthenticationPolicy)p);
+ if (operation!= null && operation.getName() != null) {
+ if (operation.getName().equals(op.getName())) {
+ for (PolicySet ps : operation.getPolicySets()) {
+ for (Object p : ps.getPolicies()) {
+ if (JaasAuthenticationPolicy.class.isInstance(p)) {
+ polices.add((JaasAuthenticationPolicy)p);
+ }
}
}
}