From 1bafec84c1e0f02f6bd1574166d403e4e67406d8 Mon Sep 17 00:00:00 2001 From: Arindam Mondal Date: Fri, 28 Jun 2019 18:21:49 +0900 Subject: General sonar fixes +) remove unused imports ++) use isEmpty to check empty list Issue-ID: CLI-170 Change-Id: I90cc07013b8db1982fdca2ccd2f4d715d8176e9d Signed-off-by: arindamm --- framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java | 1 + .../java/org/onap/cli/fw/cmd/schema/OnapSchemaValidateCommand.java | 2 -- framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) (limited to 'framework/src/main') diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java index dbd24630..b814ba82 100644 --- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java +++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java @@ -179,6 +179,7 @@ public abstract class OnapCommand { try { return new ObjectMapper().writeValueAsString(args); } catch (JsonProcessingException e) { + log.error("exception occured {}", e.getMessage()); return "{}"; } } diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/schema/OnapSchemaValidateCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/schema/OnapSchemaValidateCommand.java index 71267ec3..f6ace6d5 100644 --- a/framework/src/main/java/org/onap/cli/fw/cmd/schema/OnapSchemaValidateCommand.java +++ b/framework/src/main/java/org/onap/cli/fw/cmd/schema/OnapSchemaValidateCommand.java @@ -16,10 +16,8 @@ package org.onap.cli.fw.cmd.schema; -import java.util.ArrayList; import java.util.List; import java.util.Map; - import org.onap.cli.fw.cmd.OnapCommand; import org.onap.cli.fw.conf.OnapCommandConstants; import org.onap.cli.fw.error.OnapCommandException; diff --git a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java index ca0f04e7..bbe33594 100644 --- a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java +++ b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java @@ -20,14 +20,11 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import org.onap.cli.fw.conf.OnapCommandConstants; import org.onap.cli.fw.error.OnapCommandException; import org.onap.cli.fw.error.OnapCommandOutputFormatNotsupported; import org.onap.cli.fw.error.OnapCommandOutputPrintingFailed; -import org.onap.cli.fw.input.OnapCommandParameterType; import org.onap.cli.fw.output.print.OnapCommandPrint; -import org.onap.cli.fw.utils.OnapCommandUtils; /** * Oclip Command result holds the final output of the command. -- cgit 1.2.3-korg