summaryrefslogtreecommitdiffstats
path: root/asdc-controller
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-09-10 10:14:25 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-10 10:14:25 +0000
commit0966d538f7f04dbb99e5028e09057a3e8f866cab (patch)
tree617d2e3e2c03571c11783db97591c0e426a9f7c6 /asdc-controller
parent6cd85ccdda04348cda55e6710907ed72c9431352 (diff)
parent348e6fa1d4c8e5bcc5cca3d9a1894f18322fc1b7 (diff)
Merge "Distribution fails when no user input required in design"
Diffstat (limited to 'asdc-controller')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 10fd55abbb..e8e068a71a 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -26,6 +26,7 @@ package org.onap.so.asdc.installer.heat;
import java.sql.Timestamp;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
@@ -580,7 +581,8 @@ public class ToscaResourceInstaller {
String outInput;
String defaultValue = null;
if (value instanceof Map) {
- outInput = ((LinkedHashMap) value).values().toArray()[0].toString();
+ Collection values = ((LinkedHashMap) value).values();
+ outInput = (values.size() > 0) ? values.toArray()[0].toString() : "";
} else if (value instanceof GetInput) {
String inputName = ((GetInput) value).getInputName();
Optional<Input> inputOptional =