diff options
author | 2020-05-13 14:38:58 +0000 | |
---|---|---|
committer | 2020-05-13 14:38:58 +0000 | |
commit | 9733bbd0b124a4e646ab1c616b55fe1d4d75f3c4 (patch) | |
tree | 44724ab12081b0a8aaca8d2424cb4beca8c7aca3 /framework | |
parent | 734d238cfd53bc587179c28ac32456869069f99c (diff) |
sonar code smells fix- Format specifiers should be used instead of string concatenation
Signed-off-by: priyanka.akhade <priyanka.akhade@huawei.com>
Issue-ID: CLI-270
Change-Id: Ib2bf4d6ecb9175372a0fcbff9dbd8d18b21c64ca
Diffstat (limited to 'framework')
-rw-r--r-- | framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java | 10 |
1 files changed, 5 insertions, 5 deletions
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<String, OnapCommandParameter> 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(); |