summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/policy-security-http
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.x/modules/policy-security-http')
-rw-r--r--branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationImplementationPolicyProvider.java4
-rw-r--r--branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java28
2 files changed, 14 insertions, 18 deletions
diff --git a/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationImplementationPolicyProvider.java b/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationImplementationPolicyProvider.java
index bb1950f7f8..88f153c064 100644
--- a/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationImplementationPolicyProvider.java
+++ b/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationImplementationPolicyProvider.java
@@ -71,7 +71,7 @@ public class LDAPRealmAuthenticationImplementationPolicyProvider implements Poli
if (implementation instanceof OperationsConfigurator) {
OperationsConfigurator operationsConfigurator = (OperationsConfigurator)implementation;
for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
- if (cop.getName().equals(op.getName())) {
+ if (cop != null && cop.getName() != null && cop.getName().equals(op.getName())) {
for (PolicySet ps : cop.getPolicySets()) {
for (Object p : ps.getPolicies()) {
if (LDAPRealmAuthenticationPolicy.class.isInstance(p)) {
@@ -99,7 +99,7 @@ public class LDAPRealmAuthenticationImplementationPolicyProvider implements Poli
if (implementation instanceof OperationsConfigurator) {
OperationsConfigurator operationsConfigurator = (OperationsConfigurator)implementation;
for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
- if (cop.getName().equals(op.getName())) {
+ if (cop != null && cop.getName() != null && cop.getName().equals(op.getName())) {
for (PolicySet ps : cop.getPolicySets()) {
for (Object p : ps.getPolicies()) {
if (AuthorizationPolicy.class.isInstance(p)) {
diff --git a/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java b/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java
index 4b2bb1ad1c..6189de5a5a 100644
--- a/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java
+++ b/branches/sca-java-1.x/modules/policy-security-http/src/main/java/org/apache/tuscany/sca/policy/security/http/LDAPRealmAuthenticationServicePolicyProvider.java
@@ -89,13 +89,11 @@ 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!= 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);
- }
+ if (operation!= null && operation.getName() != null && operation.getName().equals(op.getName())) {
+ for (PolicySet ps : operation.getPolicySets()) {
+ for (Object p : ps.getPolicies()) {
+ if (LDAPRealmAuthenticationPolicy.class.isInstance(p)) {
+ polices.add((LDAPRealmAuthenticationPolicy)p);
}
}
}
@@ -105,7 +103,7 @@ public class LDAPRealmAuthenticationServicePolicyProvider implements PolicyProvi
if (service instanceof OperationsConfigurator) {
OperationsConfigurator operationsConfigurator = (OperationsConfigurator)service;
for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
- if (cop.getName().equals(op.getName())) {
+ if (cop!= null && cop.getName() != null && cop.getName().equals(op.getName())) {
for (PolicySet ps : cop.getApplicablePolicySets()) {
for (Object p : ps.getPolicies()) {
if (LDAPRealmAuthenticationPolicy.class.isInstance(p)) {
@@ -138,13 +136,11 @@ public class LDAPRealmAuthenticationServicePolicyProvider implements PolicyProvi
List<AuthorizationPolicy> polices = new ArrayList<AuthorizationPolicy>();
// FIXME: How do we get a list of effective policySets for a given operation?
for(Operation operation : operations) {
- if (operation!= null && operation.getName() != null) {
- if (operation.getName().equals(op.getName())) {
- for (PolicySet ps : operation.getPolicySets()) {
- for (Object p : ps.getPolicies()) {
- if (AuthorizationPolicy.class.isInstance(p)) {
- polices.add((AuthorizationPolicy)p);
- }
+ if (operation!= null && operation.getName() != null && operation.getName().equals(op.getName())) {
+ for (PolicySet ps : operation.getPolicySets()) {
+ for (Object p : ps.getPolicies()) {
+ if (AuthorizationPolicy.class.isInstance(p)) {
+ polices.add((AuthorizationPolicy)p);
}
}
}
@@ -154,7 +150,7 @@ public class LDAPRealmAuthenticationServicePolicyProvider implements PolicyProvi
if (service instanceof OperationsConfigurator) {
OperationsConfigurator operationsConfigurator = (OperationsConfigurator)service;
for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
- if (cop.getName().equals(op.getName())) {
+ if (cop != null && cop.getName() != null && cop.getName().equals(op.getName())) {
for (PolicySet ps : cop.getApplicablePolicySets()) {
for (Object p : ps.getPolicies()) {
if (AuthorizationPolicy.class.isInstance(p)) {