diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2019-03-06 11:33:36 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2019-03-06 11:33:36 +0530 |
commit | 5c668d26db6bb1e15ca5e128bee3231bf66a76db (patch) | |
tree | 63fd52a14f9a18bef3b88c4e3422bb1f6cd1a453 /framework/src/main | |
parent | 9cc868751e207dfcf966c4ba9ed4b50e7e996a07 (diff) |
Fix Empty service list in product
Issue-ID: CLI-129
Change-Id: Id6d9f2570c7526ea7b2bd935aeaa7ab0a5b3ca6f
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main')
-rw-r--r-- | framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
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<String>())) { this.getResult().getRecordsMap().get("service").getValues().add(service); this.getResult().getRecordsMap().get("description").getValues().add( serviceDescs.containsKey(service) ? serviceDescs.get(service) : ""); |