diff options
author | Instrumental <jonathan.gathman@att.com> | 2018-07-03 07:51:17 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2018-07-03 12:06:59 -0500 |
commit | f85f0889b3b0e5e9694afab4dd01a4a97a155188 (patch) | |
tree | 4a7119cfa0a112e514f50bbc2961981c3670ea03 /auth/auth-cmd/src | |
parent | 8efa968683ef2c4ab0ae7f4c0d2ccb0fcaa8af7b (diff) |
Collection syntax change because of Sonar
Issue-ID: AAF-386
Change-Id: I8ba8d8561d03e680ddc90a81b8db0339814c65fa
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-cmd/src')
8 files changed, 16 insertions, 16 deletions
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java index 7e25084d..1a60f68b 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java @@ -69,7 +69,7 @@ public class AAFcli { private List<Cmd> cmds; // Lex State - private ArrayList<Integer> expect = new ArrayList<Integer>(); + private ArrayList<Integer> expect = new ArrayList<>(); private boolean verbose = true; private int delay; private SecurityInfoC<HttpURLConnection> si; @@ -113,7 +113,7 @@ public class AAFcli { /* * Create Cmd Tree */ - cmds = new ArrayList<Cmd>(); + cmds = new ArrayList<>(); Role role = new Role(this); cmds.add(new Help(this, cmds)); @@ -358,7 +358,7 @@ public class AAFcli { private String[] argEval(String line) { StringBuilder sb = new StringBuilder(); - ArrayList<String> arr = new ArrayList<String>(); + ArrayList<String> arr = new ArrayList<>(); boolean start = true; char quote = 0; char last = 0; diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java index 0bfefd21..7079fed7 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java @@ -34,12 +34,12 @@ public class BaseCmd<CMD extends Cmd> extends Cmd { public BaseCmd(AAFcli aafcli, String name, Param ... params) { super(aafcli, null, name, params); - cmds = new ArrayList<Cmd>(); + cmds = new ArrayList<>(); } public BaseCmd(CMD parent, String name, Param ... params) { super(parent.aafcli, parent, name, params); - cmds = new ArrayList<Cmd>(); + cmds = new ArrayList<>(); } diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java index 7f41650d..71643cd0 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java @@ -73,7 +73,7 @@ public abstract class Cmd { private int required; protected final Cmd parent; protected final List<Cmd> children; - private final static ConcurrentHashMap<Class<?>,RosettaDF<?>> dfs = new ConcurrentHashMap<Class<?>,RosettaDF<?>>(); + private final static ConcurrentHashMap<Class<?>,RosettaDF<?>> dfs = new ConcurrentHashMap<>(); public final AAFcli aafcli; protected Access access; private AuthzEnv env; @@ -95,7 +95,7 @@ public abstract class Cmd { if(parent!=null) { parent.children.add(this); } - children = new ArrayList<Cmd>(); + children = new ArrayList<>(); this.params = params; this.name = name; required=0; diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java index 1c988e30..01017e03 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java @@ -67,7 +67,7 @@ public class ListUsersContact extends Cmd { Future<Nss> fn = client.read("/authz/nss/"+ns,getDF(Nss.class)); if(fn.get(AAFcli.timeout())) { if(fn.value!=null) { - Set<String> uset = detail?null:new HashSet<String>(); + Set<String> uset = detail?null:new HashSet<>(); for(Ns n : fn.value.getNs()) { Future<Roles> fr = client.read("/authz/roles/ns/"+n.getName(), getDF(Roles.class)); if(fr.get(AAFcli.timeout())) { diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java index 2ee8bd2c..e49a6e97 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java @@ -67,7 +67,7 @@ public class ListUsersInRole extends Cmd { Future<Nss> fn = client.read("/authz/nss/"+ns,getDF(Nss.class)); if(fn.get(AAFcli.timeout())) { if(fn.value!=null) { - Set<String> uset = detail?null:new HashSet<String>(); + Set<String> uset = detail?null:new HashSet<>(); for(Ns n : fn.value.getNs()) { Future<Roles> fr = client.read("/authz/roles/ns/"+n.getName(), getDF(Roles.class)); if(fr.get(AAFcli.timeout())) { diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java index 97ccf569..1a4ed7a7 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java @@ -67,7 +67,7 @@ public class ListUsersWithPerm extends Cmd { Future<Nss> fn = client.read("/authz/nss/"+ns,getDF(Nss.class)); if(fn.get(AAFcli.timeout())) { if(fn.value!=null) { - Set<String> uset = detail?null:new HashSet<String>(); + Set<String> uset = detail?null:new HashSet<>(); for(Ns n : fn.value.getNs()) { Future<Perms> fp = client.read("/authz/perms/ns/"+n.getName()+(aafcli.isDetailed()?"?ns":"") diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java index 3edce8de..a6d2130f 100644 --- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java +++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java @@ -61,7 +61,7 @@ public class JU_List { private class NssStub extends Nss { public void addNs(Nss.Ns ns) { if (this.ns == null) { - this.ns = new ArrayList<Nss.Ns>(); + this.ns = new ArrayList<>(); } this.ns.add(ns); } @@ -69,21 +69,21 @@ public class JU_List { private class NsStub extends Ns{ public void addAttrib(Nss.Ns.Attrib attrib) { if ( this.attrib == null) { - this.attrib = new ArrayList<Nss.Ns.Attrib>(); + this.attrib = new ArrayList<>(); } this.attrib.add(attrib); } public void addResponsible(String str) { if (this.responsible == null) { - this.responsible = new ArrayList<String>(); + this.responsible = new ArrayList<>(); } this.responsible.add(str); } public void addAdmin(String str) { if (this.admin == null) { - this.admin = new ArrayList<String>(); + this.admin = new ArrayList<>(); } this.admin.add(str); } diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java index 0c85fc3c..84b3caa9 100644 --- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java +++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java @@ -87,7 +87,7 @@ public class JU_List { private class RolesStub extends Roles { public void addRole(aaf.v2_0.Role role) { if (this.role == null) { - this.role = new ArrayList<aaf.v2_0.Role>(); + this.role = new ArrayList<>(); } this.role.add(role); } @@ -97,7 +97,7 @@ public class JU_List { public void addPerms(Pkey perms) { if (this.perms == null) { - this.perms = new ArrayList<Pkey>(); + this.perms = new ArrayList<>(); } this.perms.add(perms); } |