aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java
index 1c83b058..24d03281 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -112,6 +112,10 @@ public class DecisionProvider {
}
private void calculateStatistic(Response xacmlResponse) {
+ if (xacmlResponse == null) {
+ XacmlPdpStatisticsManager.getCurrent().updateErrorCount();
+ return;
+ }
for (Result result : xacmlResponse.getResults()) {
switch (result.getDecision()) {
case PERMIT: