diff options
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src')
-rw-r--r-- | common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java index 491382ac5b..3fcbd4f1c4 100644 --- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java +++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java @@ -84,18 +84,19 @@ public final class CliConfigurationImpl extends ConfigurationImpl implements Con private Object getInput(Map<String, Object> input) { Object toReturn = null; - if (input != null) { - try { - toReturn = Class.forName(input.get("ImplClass").toString()).newInstance(); - Method[] methods = toReturn.getClass().getMethods(); - for (Method method : methods) { - if (input.containsKey(method.getName())) { - method.invoke(toReturn, input.get(method.getName())); - } + if (input == null) { + return toReturn; + } + try { + toReturn = Class.forName(input.get("ImplClass").toString()).newInstance(); + Method[] methods = toReturn.getClass().getMethods(); + for (Method method : methods) { + if (input.containsKey(method.getName())) { + method.invoke(toReturn, input.get(method.getName())); } - } catch (Exception exception) { - LOGGER.warn("Error occurred while processing input: {}", input, exception); } + } catch (Exception exception) { + LOGGER.warn("Error occurred while processing input: {}", input, exception); } return toReturn; } |