From 5c668d26db6bb1e15ca5e128bee3231bf66a76db Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Wed, 6 Mar 2019 11:33:36 +0530 Subject: Fix Empty service list in product Issue-ID: CLI-129 Change-Id: Id6d9f2570c7526ea7b2bd935aeaa7ab0a5b3ca6f Signed-off-by: Kanagaraj Manickam k00365106 --- .../main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java index 8cbfa36c..010cdc19 100644 --- a/framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java +++ b/framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java @@ -72,7 +72,7 @@ public class OnapServiceListCommand extends OnapCommand { } } - for (String service : rslt.get(product)) { + for (String service : rslt.getOrDefault(product, new HashSet())) { this.getResult().getRecordsMap().get("service").getValues().add(service); this.getResult().getRecordsMap().get("description").getValues().add( serviceDescs.containsKey(service) ? serviceDescs.get(service) : ""); -- cgit 1.2.3-korg