aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/main/java/org/onap
diff options
context:
space:
mode:
authorChuanyu Chen <chenchuanyu@huawei.com>2020-10-30 01:00:30 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-30 01:00:30 +0000
commit4026813ee1ae77a92fd36f5de22a9a5d405306e4 (patch)
tree52c35c92268969a728011308b3086c18eff2c1da /common/src/main/java/org/onap
parent095cadcfe590b2cdfd65a56833cb97440c18b3f2 (diff)
parent6b1fda49736a9a5d15385892ae5876aef07ad7bc (diff)
Merge "modify subnetCapabilityQuery interface and some workflow error"
Diffstat (limited to 'common/src/main/java/org/onap')
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
index 8ea0eb6587..e97aa704eb 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
@@ -48,23 +48,23 @@ public class SliceTaskParamsAdapter implements Serializable {
private String nstName;
- private Map<String, Object> serviceProfile;
+ private Map<String, Object> serviceProfile = new HashMap<>();
private String suggestNsiId;
private String suggestNsiName;
- private TemplateInfo NSTInfo;
+ private TemplateInfo NSTInfo = new TemplateInfo();
- private SliceTaskInfo<TnSliceProfile> tnBHSliceTaskInfo;
+ private SliceTaskInfo<TnSliceProfile> tnBHSliceTaskInfo = new SliceTaskInfo<>();
- private SliceTaskInfo<TnSliceProfile> tnMHSliceTaskInfo;
+ private SliceTaskInfo<TnSliceProfile> tnMHSliceTaskInfo = new SliceTaskInfo<>();
- private SliceTaskInfo<TnSliceProfile> tnFHSliceTaskInfo;
+ private SliceTaskInfo<TnSliceProfile> tnFHSliceTaskInfo = new SliceTaskInfo<>();
- private SliceTaskInfo<CnSliceProfile> cnSliceTaskInfo;
+ private SliceTaskInfo<CnSliceProfile> cnSliceTaskInfo = new SliceTaskInfo<>();
- private SliceTaskInfo<AnSliceProfile> anSliceTaskInfo;
+ private SliceTaskInfo<AnSliceProfile> anSliceTaskInfo = new SliceTaskInfo<>();
@SuppressWarnings("unchecked")
public void convertFromJson(String jsonString) throws IOException {
@@ -226,6 +226,10 @@ public class SliceTaskParamsAdapter implements Serializable {
*/
private <T> Map<String, Object> bean2Map(T t) {
Map<String, Object> resMap = new HashMap<>();
+ if (t == null) {
+ return resMap;
+ }
+
try {
Field[] fields = t.getClass().getDeclaredFields();
for (Field field : fields) {