diff options
author | hetengjiao <hetengjiao@chinamobile.com> | 2020-10-29 11:18:50 +0800 |
---|---|---|
committer | HE TENGJIAO <hetengjiao@chinamobile.com> | 2020-10-29 10:34:40 +0000 |
commit | 6b1fda49736a9a5d15385892ae5876aef07ad7bc (patch) | |
tree | adc85410a990a446d960790c0b070b0ba1daaff5 /common/src/main/java | |
parent | aa859daa7e210a286aae0e496fa09b4d9c133b86 (diff) |
modify subnetCapabilityQuery interface and some workflow error
Issue-ID: SO-2963
Signed-off-by: hetengjiao <hetengjiao@chinamobile.com>
Change-Id: Ieda037b617f3743a28aaba30e7f22bf5df919a24
Diffstat (limited to 'common/src/main/java')
-rw-r--r-- | common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java | 18 |
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) { |