From 9733bbd0b124a4e646ab1c616b55fe1d4d75f3c4 Mon Sep 17 00:00:00 2001 From: "priyanka.akhade" Date: Wed, 13 May 2020 14:38:58 +0000 Subject: sonar code smells fix- Format specifiers should be used instead of string concatenation Signed-off-by: priyanka.akhade Issue-ID: CLI-270 Change-Id: Ib2bf4d6ecb9175372a0fcbff9dbd8d18b21c64ca --- framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'framework/src') 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 3e46c1bb..6e224209 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 @@ -232,11 +232,11 @@ public abstract class OnapCommand { } protected void preRun() throws OnapCommandException { - log.debug(this.getName() + " PRE-RUN"); + log.debug("{} PRE-RUN", this.getName()); } protected void postRun() throws OnapCommandException { - log.debug(this.getName() + " POST-RUN"); + log.debug("{} POST-RUN", this.getName()); } /** @@ -251,11 +251,11 @@ public abstract class OnapCommand { throw new OnapCommandNotInitialized(this.getClass().getName()); } - log.info("CMD: " + this.getName()); + log.info("CMD: {}", this.getName()); Map paramMap = this.getParametersMap(); - log.info("INPUT: " + paramMap); + log.info("INPUT: {}", paramMap); // -h or --help is always higher precedence !, user can set this value to get help message if ((Boolean)(paramMap.get(OnapCommandConstants.DEFAULT_PARAMETER_HELP).getValue())) { @@ -316,7 +316,7 @@ public abstract class OnapCommand { this.run(); - log.info("OUTPUT: " + this.cmdResult.getRecords()); + log.info("OUTPUT: {}", this.cmdResult.getRecords()); postRun(); -- cgit 1.2.3-korg