summaryrefslogtreecommitdiffstats
path: root/ECOMP-REST
diff options
context:
space:
mode:
Diffstat (limited to 'ECOMP-REST')
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/XacmlAdminAuthorization.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/XacmlAdminAuthorization.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/XacmlAdminAuthorization.java
index ae72db267..9a2dbdbdb 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/XacmlAdminAuthorization.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/XacmlAdminAuthorization.java
@@ -202,12 +202,14 @@ public class XacmlAdminAuthorization {
//
// Should only be one result
//
- for (Result result : response.getResults()) {
- Decision decision = result.getDecision();
- logger.info("Decision: " + decision);
- if (decision.equals(Decision.PERMIT)) {
- return true;
- }
+ if(response != null){
+ for (Result result : response.getResults()) {
+ Decision decision = result.getDecision();
+ logger.info("Decision: " + decision);
+ if (decision.equals(Decision.PERMIT)) {
+ return true;
+ }
+ }
}
} catch (PDPException e) {
logger.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "PDP Decide failed: " + e.getLocalizedMessage());