summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authoraosull01 <adrian.osullivan@huawei.com>2019-11-13 15:17:49 +0000
committerMatthieu Geerebaert <matthieu.geerebaert@orange.com>2019-11-13 15:39:50 +0000
commit063ebf596dc67b870220d2664edc576f43e7f6e5 (patch)
tree98bcfd45267e2733ca2ddde2a637a52d0358aed2 /src/main
parent5d4e5d3e5ee349e3f74c96dbdb287b09a77e9ee0 (diff)
Fix issue with null Pointer for Inputs of type list/map
Issue-ID: EXTAPI-354 Signed-off-by: aosull01 <adrian.osullivan@huawei.com> Change-Id: I5650233598618982c023fa5b786b049981efbaca
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java b/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java
index 649ae22..97bcd9c 100644
--- a/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java
+++ b/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java
@@ -124,8 +124,13 @@ public class ToscaInfosProcessor {
if (inputs != null && inputs.size() > 0) {
for (Input input : inputs) {
- Property property = PropertyBuilder.build(input.getType(), null, null);
- property.setDescription(input.getDescription());
+ Property property = null;
+ if (input.getType().equals("list") || input.getType().equals("map"))
+ property = PropertyBuilder.build("array", null, null);
+ else
+ property = PropertyBuilder.build(input.getType(), null, null);
+
+ property.setDescription(input.getDescription());
property.setRequired(input.isRequired());
if (input.getDefault() != null) {