From 9a17e473ab01142f0068bd69ac3f289494a909b0 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 18 Dec 2017 17:13:15 +0530 Subject: Fix logout and auth specific param customization Issue-ID: CLI-66 Change-Id: Ic50f4bf040bc88e29419942076d9c7d154d384d1 Signed-off-by: Kanagaraj Manickam k00365106 --- .../main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java | 2 +- .../src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java | 1 + framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'framework/src/main') diff --git a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java index c00c88b1..d54fbff0 100644 --- a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java +++ b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java @@ -58,7 +58,7 @@ public class OnapCommandResultAttribute { private boolean isSecured = false; public void setValues(List values) { - this.values = values; + this.values = (values == null) ? new ArrayList<>() : values; } public String getName() { diff --git a/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java b/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java index f8fb73fd..e9dc288b 100644 --- a/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java +++ b/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java @@ -274,6 +274,7 @@ public class OnapCommandRegistrar { continue; } + //First check if there is an specific plugin exist, otherwise check for profile plugin if (plugins.containsKey(schema.getSchemaName())) { this.register(schema.getCmdName(), schema.getProduct(), plugins.get(schema.getSchemaName())); } else if (plugins.containsKey(schema.getSchemaProfile())) { diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java index ad739cd7..383a5b99 100644 --- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java +++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java @@ -320,7 +320,7 @@ public class OnapCommandUtils { } public static void copyParamsFrom(OnapCommand from, OnapCommand to) throws OnapCommandInvalidParameterValue { - OnapCommandUtils.copyParamsFrom(from, to, new HashMap()); + copyParamsFrom(from, to, new HashMap()); } /** -- cgit 1.2.3-korg