From 6b1fda49736a9a5d15385892ae5876aef07ad7bc Mon Sep 17 00:00:00 2001 From: hetengjiao Date: Thu, 29 Oct 2020 11:18:50 +0800 Subject: modify subnetCapabilityQuery interface and some workflow error Issue-ID: SO-2963 Signed-off-by: hetengjiao Change-Id: Ieda037b617f3743a28aaba30e7f22bf5df919a24 --- .../org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'common/src/main/java') 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 serviceProfile; + private Map serviceProfile = new HashMap<>(); private String suggestNsiId; private String suggestNsiName; - private TemplateInfo NSTInfo; + private TemplateInfo NSTInfo = new TemplateInfo(); - private SliceTaskInfo tnBHSliceTaskInfo; + private SliceTaskInfo tnBHSliceTaskInfo = new SliceTaskInfo<>(); - private SliceTaskInfo tnMHSliceTaskInfo; + private SliceTaskInfo tnMHSliceTaskInfo = new SliceTaskInfo<>(); - private SliceTaskInfo tnFHSliceTaskInfo; + private SliceTaskInfo tnFHSliceTaskInfo = new SliceTaskInfo<>(); - private SliceTaskInfo cnSliceTaskInfo; + private SliceTaskInfo cnSliceTaskInfo = new SliceTaskInfo<>(); - private SliceTaskInfo anSliceTaskInfo; + private SliceTaskInfo anSliceTaskInfo = new SliceTaskInfo<>(); @SuppressWarnings("unchecked") public void convertFromJson(String jsonString) throws IOException { @@ -226,6 +226,10 @@ public class SliceTaskParamsAdapter implements Serializable { */ private Map bean2Map(T t) { Map resMap = new HashMap<>(); + if (t == null) { + return resMap; + } + try { Field[] fields = t.getClass().getDeclaredFields(); for (Field field : fields) { -- cgit 1.2.3-korg