From 063ebf596dc67b870220d2664edc576f43e7f6e5 Mon Sep 17 00:00:00 2001 From: aosull01 Date: Wed, 13 Nov 2019 15:17:49 +0000 Subject: Fix issue with null Pointer for Inputs of type list/map Issue-ID: EXTAPI-354 Signed-off-by: aosull01 Change-Id: I5650233598618982c023fa5b786b049981efbaca --- .../org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/onap') 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) { -- cgit 1.2.3-korg