Merge "System dependent separators in JU tests"
[aaf/authz.git] / auth / auth-batch / src / main / java / org / onap / aaf / auth / update / NotifyCredExpiring.java
index bdf8347..fe8f16d 100644 (file)
@@ -128,12 +128,12 @@ public class NotifyCredExpiring extends Batch {
                Date tooLate = new Date(now);
                
                // Temp structures
-               Map<String,Cred> lastCred = new HashMap<String,Cred>();
-               Map<String,List<LastCred>> ownerCreds = new TreeMap<String,List<LastCred>>();
+               Map<String,Cred> lastCred = new HashMap<>();
+               Map<String,List<LastCred>> ownerCreds = new TreeMap<>();
                Date last;
                
 
-               List<LastCred> noOwner = new ArrayList<LastCred>();
+               List<LastCred> noOwner = new ArrayList<>();
                ownerCreds.put(UNKNOWN_ID,noOwner);
 
                // Get a list of ONLY the ones needing email by Owner
@@ -142,13 +142,13 @@ public class NotifyCredExpiring extends Batch {
                        for(Cred c : es.getValue()) {
                                last = c.last(CredDAO.BASIC_AUTH,CredDAO.BASIC_AUTH_SHA256);
                                if(last!=null && last.after(tooLate) && last.before(early)) {
-                                       List<UserRole> ownerURList = UserRole.byRole.get(es.getKey()+".owner");
+                                       List<UserRole> ownerURList = UserRole.getByRole().get(es.getKey()+".owner");
                                        if(ownerURList!=null) {
                                                for(UserRole ur:ownerURList) {
                                                        String owner = ur.user();
                                                        List<LastCred> llc = ownerCreds.get(owner);
                                                        if(llc==null) {
-                                                               ownerCreds.put(owner, (llc=new ArrayList<LastCred>()));
+                                                               ownerCreds.put(owner, (llc=new ArrayList<>()));
                                                        }
                                                        llc.add(new LastCred(c,last));
                                                }