aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-10-11 15:40:41 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-11 15:40:41 +0000
commit82b577dfb36788936d1503c7fd77320536cc2d10 (patch)
treecb4d68c91792b9a237eef741128c7c21cdfed489 /controlloop
parent12d0a4a50b84323ff9e23a1cb9d34de1d9cda3d7 (diff)
parent8caedad524f0fd850cfe7dcb7911af0e7115de60 (diff)
Merge "Fix nullPointerException non-200 guard response."
Diffstat (limited to 'controlloop')
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
index 908a3aff9..0ecfaa6c4 100644
--- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
+++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
@@ -231,12 +231,13 @@ public class PolicyGuardXacmlHelper {
} catch (Exception e) {
logger.error(
"Exception in 'PolicyGuardXacmlHelper.callRESTfulPDP'", e);
- //
- // Connection may have failed, return Indeterminate
- //
- if(response == null || response.isEmpty()){
- return Util.INDETERMINATE;
- }
+ }
+
+ //
+ // Connection may have failed or not been 200 OK, return Indeterminate
+ //
+ if(response == null || response.isEmpty()){
+ return Util.INDETERMINATE;
}
rawDecision = new JSONObject(response).getString("decision");