From: Arundathi Patil Date: Wed, 19 Sep 2018 11:23:18 +0000 (+0530) Subject: SonarFix-ListAdminResponsible,ListbyName,ListChild X-Git-Tag: 2.1.2~9^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=f526c472a95d08104e5f0be04eafa406378401df;hp=e66b95f220bbef1efeaee337749f91e7b15b1fd7;p=aaf%2Fauthz.git SonarFix-ListAdminResponsible,ListbyName,ListChild Fixed sonar code-smells/issues across these files ListAdminResponsible, ListByName, ListChildren Issue-ID: AAF-508 Change-Id: I993d2946c8e17caae9ce6dd9600dc52d98a1206b Signed-off-by: Arundathi Patil --- diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java index e62207a0..3e3a0ea6 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java @@ -36,7 +36,7 @@ import aaf.v2_0.Nss; public class ListAdminResponsible extends Cmd { private static final String HEADER="List Namespaces with "; - private final static String[] options = {"admin","owner"}; + private static final String[] options = {"admin","owner"}; public ListAdminResponsible(List parent) { super(parent,null, diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java index 3189b88b..b4cca87e 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java @@ -52,8 +52,8 @@ public class ListByName 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; final String ns=args[idx++]; return same(new Retryable() { @Override diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java index b3b0bcfc..96baa324 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java @@ -49,8 +49,8 @@ public class ListChildren 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; final String ns=args[idx++]; return same(new Retryable() { @Override