summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/policy-security
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-22 09:54:08 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-22 09:54:08 +0000
commit6f6df0fde75eca1c1a4d1423205db6b07916b506 (patch)
tree6c2612f2c3a86863e36afbcd05112769710a5621 /branches/sca-java-1.x/modules/policy-security
parent2e0063cb2a2688378e22c3742243886ed05939b3 (diff)
Merge policy NPE fixes from 1.5 branch
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@777443 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/policy-security')
-rw-r--r--branches/sca-java-1.x/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.x/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationServicePolicyProvider.java b/branches/sca-java-1.x/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationServicePolicyProvider.java
index 19b7d00127..56927be6bb 100644
--- a/branches/sca-java-1.x/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationServicePolicyProvider.java
+++ b/branches/sca-java-1.x/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);
+ }
}
}
}