From f85f0889b3b0e5e9694afab4dd01a4a97a155188 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Tue, 3 Jul 2018 07:51:17 -0500 Subject: Collection syntax change because of Sonar Issue-ID: AAF-386 Change-Id: I8ba8d8561d03e680ddc90a81b8db0339814c65fa Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/org/DefaultOrg.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'auth/auth-deforg') diff --git a/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java b/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java index eefb2732..dd4a8260 100644 --- a/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java +++ b/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java @@ -62,7 +62,7 @@ public class DefaultOrg implements Organization { public DefaultOrg(Env env, String realm) throws OrganizationException { this.realm = realm; - supportedRealms=new HashSet(); + supportedRealms=new HashSet<>(); supportedRealms.add(realm); domain=FQI.reverseDomain(realm); atDomain = '@'+domain; @@ -126,7 +126,7 @@ public class DefaultOrg implements Organization { } // Implement your own Delegation System - static final List NULL_DELEGATES = new ArrayList(); + static final List NULL_DELEGATES = new ArrayList<>(); public Identities identities; private boolean dryRun; @@ -135,7 +135,7 @@ public class DefaultOrg implements Organization { private final static Set typeSet; static { - typeSet = new HashSet(); + typeSet = new HashSet<>(); for(Types t : Types.values()) { typeSet.add(t.name()); } @@ -251,7 +251,7 @@ public class DefaultOrg implements Organization { public Response notify(AuthzTrans trans, Notify type, String url, String[] identities, String[] ccs, String summary, Boolean urgent) { String system = trans.getProperty("CASS_ENV", ""); - ArrayList toList = new ArrayList(); + ArrayList toList = new ArrayList<>(); Identity identity; if (identities != null) { for (String user : identities) { @@ -278,7 +278,7 @@ public class DefaultOrg implements Organization { return Response.ERR_NotificationFailure; } - ArrayList ccList = new ArrayList(); + ArrayList ccList = new ArrayList<>(); // If we're sending an urgent email, CC the user's supervisor // @@ -393,7 +393,7 @@ public class DefaultOrg implements Organization { int status = 1; - List to = new ArrayList(); + List to = new ArrayList<>(); for(String em : toList) { if(em.indexOf('@')<0) { to.add(new DefaultOrgIdentity(trans, em, this).email()); @@ -402,7 +402,7 @@ public class DefaultOrg implements Organization { } } - List cc = new ArrayList(); + List cc = new ArrayList<>(); if(ccList!=null) { if(!ccList.isEmpty()) { @@ -461,7 +461,7 @@ public class DefaultOrg implements Organization { message.addHeader("X-Priority", "1"); } - ArrayList newBody = new ArrayList(); + ArrayList newBody = new ArrayList<>(); Address temp[] = getAddresses(to); String headerString = "TO:\t" + InternetAddress.toString(temp) + "\n"; @@ -574,7 +574,7 @@ public class DefaultOrg implements Organization { @Override public List getApprovers(AuthzTrans trans, String user) throws OrganizationException { Identity orgIdentity = getIdentity(trans, user); - List orgIdentitys = new ArrayList(); + List orgIdentitys = new ArrayList<>(); if(orgIdentity!=null) { Identity supervisor = orgIdentity.responsibleTo(); if(supervisor!=null) { -- cgit 1.2.3-korg