From e3acfdc96b99ac222b3d46a3838b356e6a471072 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 11 Sep 2018 13:39:42 +0530 Subject: Deprecated.java and Help.java: Sonar issue Fixed major sonar issues in help.java and deprecated.java files. Issue-ID: AAF-481 Change-Id: I3855e0cc442a929fcba785c011f4f84ccad3545a Signed-off-by: Arundathi Patil --- .../src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java | 4 ++-- auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'auth/auth-cmd/src/main/java') diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java index dad2076f..6082fac8 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java @@ -45,9 +45,9 @@ public class DeprecatedCMD extends BaseCmd { } @Override - public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException { + public int _exec(int idx, final String ... args) throws CadiException, APIException, LocatorException { pw().println(text); - return _idx; + return idx; } } diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java index 66a3355a..12cf0635 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java @@ -38,8 +38,8 @@ public class Help extends Cmd { } @Override - public int _exec( int _idx, final String ... args) throws CadiException, APIException, LocatorException { - int idx = _idx; + public int _exec( int idxValue, final String ... args) throws CadiException, APIException, LocatorException { + int idx = idxValue; boolean first = true; StringBuilder sb = new StringBuilder("AAF Command Line Tool"); StringBuilder details; @@ -75,7 +75,6 @@ public class Help extends Cmd { c.build(sb,details); if (details!=null) { c.detailedHelp(4, sb); - // multiChar(sb,80,'-',2); } } } @@ -86,8 +85,8 @@ public class Help extends Cmd { } @Override - public void detailedHelp(int _indent, StringBuilder sb) { - int indent = _indent; + public void detailedHelp(int indentValue, StringBuilder sb) { + int indent = indentValue; detailLine(sb,indent,"To print main help, enter \"aafcli\" or \"aafcli --help \""); detailLine(sb,indent,"To print narrow the help content, enter sub-entries after aafcli,"); detailLine(sb,indent+2,"i.e. \"aafcli perm\""); -- cgit 1.2.3-korg