summaryrefslogtreecommitdiffstats
path: root/auth/auth-gui/src/main
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-07-03 07:51:17 -0500
committerInstrumental <jonathan.gathman@att.com>2018-07-03 12:06:59 -0500
commitf85f0889b3b0e5e9694afab4dd01a4a97a155188 (patch)
tree4a7119cfa0a112e514f50bbc2961981c3670ea03 /auth/auth-gui/src/main
parent8efa968683ef2c4ab0ae7f4c0d2ccb0fcaa8af7b (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-gui/src/main')
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java4
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApiDocs.java12
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CMArtifactShow.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CredDetail.java12
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java6
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsHistory.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NssShow.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermDetail.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermGrantForm.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermHistory.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermsShow.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RequestDetail.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetailAction.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleHistory.java2
16 files changed, 29 insertions, 29 deletions
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
index 436b37a0..346c8ae2 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
@@ -83,7 +83,7 @@ public class Page extends HTMLCacheGen {
public final boolean no_cache;
// Note: Only access is synchronized in "getPerm"
- private final static Map<String,Map<String,Permission>> perms = new HashMap<String,Map<String,Permission>>();
+ private final static Map<String,Map<String,Permission>> perms = new HashMap<>();
public String name() {
return bcName;
@@ -379,7 +379,7 @@ public class Page extends HTMLCacheGen {
Map<String,Permission> msp = perms.get(instance);
Permission p;
if(msp==null) {
- msp = new HashMap<String,Permission>();
+ msp = new HashMap<>();
perms.put(instance, msp);
p=null;
} else {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApiDocs.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApiDocs.java
index 40d57c95..95aa0525 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApiDocs.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApiDocs.java
@@ -161,12 +161,12 @@ public class ApiDocs extends Page {
@Override
public Cells get(final AuthzTrans trans, final AAF_GUI gui) {
- final ArrayList<AbsCell[]> ns = new ArrayList<AbsCell[]>();
- final ArrayList<AbsCell[]> perms = new ArrayList<AbsCell[]>();
- final ArrayList<AbsCell[]> roles = new ArrayList<AbsCell[]>();
- final ArrayList<AbsCell[]> user = new ArrayList<AbsCell[]>();
- final ArrayList<AbsCell[]> aafOnly = new ArrayList<AbsCell[]>();
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> ns = new ArrayList<>();
+ final ArrayList<AbsCell[]> perms = new ArrayList<>();
+ final ArrayList<AbsCell[]> roles = new ArrayList<>();
+ final ArrayList<AbsCell[]> user = new ArrayList<>();
+ final ArrayList<AbsCell[]> aafOnly = new ArrayList<>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
final TimeTaken tt = trans.start("AAF APIs",Env.REMOTE);
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CMArtifactShow.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CMArtifactShow.java
index 296e41e1..d423731a 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CMArtifactShow.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CMArtifactShow.java
@@ -159,7 +159,7 @@ public class CMArtifactShow extends Page {
return Cells.EMPTY;
}
final String id = str.indexOf('@')>=0?str:str + '@' + FQI.reverseDomain(sc.get(trans,Params.ns, ""));
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
final TimeTaken tt = trans.start("AAF X509 Details",Env.REMOTE);
try {
gui.cmClientAsUser(trans.getUserPrincipal(),new Retryable<Void>() {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CredDetail.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CredDetail.java
index 8c7c8763..208c750e 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CredDetail.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/CredDetail.java
@@ -148,7 +148,7 @@ public class CredDetail extends Page {
if(ns==null) {
return Cells.EMPTY;
}
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
final TimeTaken tt = trans.start("AAF Cred Details",Env.REMOTE);
List<Artifact> la;
try {
@@ -164,7 +164,7 @@ public class CredDetail extends Page {
}
});
- final Set<String> lns = new HashSet<String>();
+ final Set<String> lns = new HashSet<>();
if(la!=null) {
for(Artifact a : la){
lns.add(a.getMechid());
@@ -176,7 +176,7 @@ public class CredDetail extends Page {
Future<Users> fu = client.read("/authn/creds/ns/"+ns,gui.getDF(Users.class));
if(fu.get(AAFcli.timeout())) {
// Organize User entries
- Map<String,List<Map<Integer,List<User>>>> users = new HashMap<String,List<Map<Integer,List<User>>>>();
+ Map<String,List<Map<Integer,List<User>>>> users = new HashMap<>();
List<Map<Integer,List<User>>> lmu=null;
Map<Integer, List<User>> mu = null;
@@ -188,7 +188,7 @@ public class CredDetail extends Page {
}
lmu = users.get(u.getId());
if(lmu==null) {
- users.put(u.getId(),lmu=new ArrayList<Map<Integer,List<User>>>());
+ users.put(u.getId(),lmu=new ArrayList<>());
}
mu=null;
for(Map<Integer,List<User>> xmu : lmu) {
@@ -198,12 +198,12 @@ public class CredDetail extends Page {
}
if(mu==null) {
- lmu.add(mu=new HashMap<Integer,List<User>>());
+ lmu.add(mu=new HashMap<>());
}
lu = mu.get(u.getType());
if(lu==null) {
- mu.put(u.getType(),lu = new ArrayList<User>());
+ mu.put(u.getType(),lu = new ArrayList<>());
}
lu.add(u);
}
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java
index 8c442dd7..0a74d607 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java
@@ -109,7 +109,7 @@ public class NsDetail extends Page {
if(nsName==null) {
return Cells.EMPTY;
}
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
rv.add(new AbsCell[]{new TextCell("Name:"),new TextCell(nsName)});
final TimeTaken tt = trans.start("AAF Namespace Details",Env.REMOTE);
@@ -144,7 +144,7 @@ public class NsDetail extends Page {
"/authz/roles/ns/"+nsName,
gui.getDF(Roles.class)
);
- List<String> roles = new ArrayList<String>();
+ List<String> roles = new ArrayList<>();
if(fr.get(AAFcli.timeout())) {
for (Role r : fr.value.getRole()) {
roles.add(r.getName());
@@ -157,7 +157,7 @@ public class NsDetail extends Page {
"/authz/perms/ns/"+nsName,
gui.getDF(Perms.class)
);
- List<String> perms = new ArrayList<String>();
+ List<String> perms = new ArrayList<>();
if(fp.get(AAFcli.timeout())) {
for (Perm p : fp.value.getPerm()) {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsHistory.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsHistory.java
index 96ec002e..6d55858b 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsHistory.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsHistory.java
@@ -168,7 +168,7 @@ public class NsHistory extends Page {
return Cells.EMPTY;
}
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
String msg = null;
final TimeTaken tt = trans.start("AAF Get History for Namespace ["+oName+"]",Env.REMOTE);
try {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NssShow.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NssShow.java
index 02aedc5a..fecd2326 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NssShow.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NssShow.java
@@ -83,7 +83,7 @@ public class NssShow extends Page {
@Override
public Cells get(final AuthzTrans trans, final AAF_GUI gui) {
- ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ ArrayList<AbsCell[]> rv = new ArrayList<>();
List<Ns> nss = trans.get(sNssByUser, null);
if(nss==null) {
TimeTaken tt = trans.start("AAF Nss by User for " + privilege,Env.REMOTE);
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java
index 9d2b2cb0..6e7081bc 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java
@@ -117,7 +117,7 @@ public class PendingRequestsShow extends Page {
@Override
public Cells get(final AuthzTrans trans, final AAF_GUI gui) {
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
try {
gui.clientAsUser(trans.getUserPrincipal(), new Retryable<Void>() {
@Override
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermDetail.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermDetail.java
index 822d0bf4..01c96a62 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermDetail.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermDetail.java
@@ -96,7 +96,7 @@ public class PermDetail extends Page {
trans.warn().printf("Error in PermDetail Request: %s", v.errs());
return Cells.EMPTY;
}
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
rv.add(new AbsCell[]{new TextCell("Type:"),new TextCell(pType)});
rv.add(new AbsCell[]{new TextCell("Instance:"),new TextCell(pInstance)});
rv.add(new AbsCell[]{new TextCell("Action:"),new TextCell(pAction)});
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermGrantForm.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermGrantForm.java
index 1c5bc4c1..db3d741b 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermGrantForm.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermGrantForm.java
@@ -125,7 +125,7 @@ public class PermGrantForm extends Page {
}
private static List<String> getMyRoles(final AAF_GUI gui, final AuthzTrans trans) {
- final List<String> myRoles = new ArrayList<String>();
+ final List<String> myRoles = new ArrayList<>();
try {
gui.clientAsUser(trans.getUserPrincipal(), new Retryable<Void>() {
@Override
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermHistory.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermHistory.java
index b7a9960c..37a2c22d 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermHistory.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermHistory.java
@@ -175,7 +175,7 @@ public class PermHistory extends Page {
return Cells.EMPTY;
}
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
String msg = null;
try {
gui.clientAsUser(trans.getUserPrincipal(), new Retryable<Void>() {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermsShow.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermsShow.java
index 5f5c2874..9b39945d 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermsShow.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermsShow.java
@@ -77,7 +77,7 @@ public class PermsShow extends Page {
@Override
public Cells get(final AuthzTrans trans, final AAF_GUI gui) {
- final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ final ArrayList<AbsCell[]> rv = new ArrayList<>();
TimeTaken tt = trans.start("AAF Perms by User",Env.REMOTE);
try {
gui.clientAsUser(trans.getUserPrincipal(), new Retryable<Void>() {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RequestDetail.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RequestDetail.java
index 626b7da5..3e959ef5 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RequestDetail.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RequestDetail.java
@@ -86,7 +86,7 @@ public class RequestDetail extends Page {
@Override
public Cells code(Rcli<?> client) throws CadiException, ConnectException, APIException {
TimeTaken tt = trans.start("AAF Approval Details",Env.REMOTE);
- ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ ArrayList<AbsCell[]> rv = new ArrayList<>();
try {
Future<Approvals> fa = client.read(
"/authz/approval/ticket/"+ticket,
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.java
index a4d8bed3..a39bf822 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.java
@@ -181,7 +181,7 @@ public class RoleDetail extends Page {
public Cells get(final AuthzTrans trans, final AAF_GUI gui) {
final String pRole = trans.get(sRoleName, null);
final Role role = trans.get(sRole,null);
- ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ ArrayList<AbsCell[]> rv = new ArrayList<>();
if(role!=null) {
boolean mayWrite = trans.get(sMayWrite, false);
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetailAction.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetailAction.java
index f2d2c01f..f9f919a2 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetailAction.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetailAction.java
@@ -76,7 +76,7 @@ public class RoleDetailAction extends Page {
/*fail =*/ gui.clientAsUser(trans.getUserPrincipal(), new Retryable<Boolean>() {
@Override
public Boolean code(Rcli<?> client) throws CadiException, ConnectException, APIException {
- List<TypedFuture> ltf = new ArrayList<TypedFuture>();
+ List<TypedFuture> ltf = new ArrayList<>();
String text;
Map<String, String[]> pm = (Map<String, String[]>)req.getParameterMap();
for(final Entry<String, String[]> es : pm.entrySet()) {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleHistory.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleHistory.java
index 5f7625aa..4a9bd362 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleHistory.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleHistory.java
@@ -171,7 +171,7 @@ public class RoleHistory extends Page {
rv = gui.clientAsUser(trans.getUserPrincipal(), new Retryable<Cells>() {
@Override
public Cells code(Rcli<?> client) throws CadiException, ConnectException, APIException {
- ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+ ArrayList<AbsCell[]> rv = new ArrayList<>();
TimeTaken tt = trans.start("AAF Get History for Namespace ["+oName+"]",Env.REMOTE);
String msg = null;
try {