From 7f7b5af5b56186445065f694d68bd2726e997ca3 Mon Sep 17 00:00:00 2001 From: lresende Date: Tue, 5 May 2009 07:17:51 +0000 Subject: Fixing NPE when no operation provided when creating invoker git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@771598 13f79535-47bb-0310-9956-ffa450edef68 --- .../http/LDAPRealmAuthenticationServicePolicyProvider.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'branches/sca-java-1.x/modules/policy-security-http') 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 117e9a0009..dfe72bee36 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 @@ -59,7 +59,12 @@ public class LDAPRealmAuthenticationServicePolicyProvider implements PolicyProvi } public Interceptor createInterceptor(Operation operation) { - List policies = findPolicies(operation); + List policies = null; + + if (operation != null) { + policies = findPolicies(operation); + } + if (policies == null || policies.isEmpty()) { return null; } else { -- cgit v1.2.3