summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliboNet <libo.zhu@intel.com>2018-10-17 08:14:23 +0800
committerliboNet <libo.zhu@intel.com>2018-10-17 10:45:17 +0800
commit4978409efc08380c61efd7bf1e3822897d9b51fa (patch)
treea98a9a48d8f1dfb001113a64fc447d90d36f89f3
parent081075612bb3e614eaab96c8c613e508fce8c3fd (diff)
Fix NullPointerException of PolicyScope field
add HPA into PolicyScope to fix the NullPointerException Change-Id: I160e630d982257c57e1f950906c231c895872c71 Issue-ID: POLICY-1200 Signed-off-by: liboNet <libo.zhu@intel.com>
-rw-r--r--plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java
index 030c470b..97ca3f5e 100644
--- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java
+++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java
@@ -69,6 +69,7 @@ public class PolicyDecoderCsarPdpx implements PolicyDecoder<Csar, OptimizationPo
configBody.setRiskLevel(decoderParameters.getRiskLevel());
configBody.setRiskType(decoderParameters.getRiskType());
configBody.setGuard("false");
+ content.getPolicyScope().add("HPA");
configBody.setContent(content);
policy.setConfigBody(gson.toJson(configBody));
policys.add(policy);