diff options
Diffstat (limited to 'auth/auth-batch/src')
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java | 12 | ||||
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/URFutureApproveExec.java | 4 |
2 files changed, 6 insertions, 10 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java index 25e2ffca..15dfed38 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java @@ -46,9 +46,9 @@ public class Email implements Action<Organization,Void, String>{ public Email(String ... defaultCC) { - toList = new ArrayList<String>(); + toList = new ArrayList<>(); this.defaultCC = defaultCC; - ccList = new ArrayList<String>(); + ccList = new ArrayList<>(); clear(); } @@ -71,10 +71,8 @@ public class Email implements Action<Organization,Void, String>{ } public Email addTo(Identity id) { - if(id!=null) { - if(!toList.contains(id.email())) { + if(id!=null && !toList.contains(id.email())) { toList.add(id.email()); - } } return this; } @@ -94,10 +92,8 @@ public class Email implements Action<Organization,Void, String>{ } public Email addCC(Identity id) { - if(id!=null) { - if(!ccList.contains(id.email())) { + if(id!=null && !ccList.contains(id.email())) { ccList.add(id.email()); - } } return this; } diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/URFutureApproveExec.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/URFutureApproveExec.java index 6cf2c53e..635efef0 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/URFutureApproveExec.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/URFutureApproveExec.java @@ -56,8 +56,8 @@ public class URFutureApproveExec extends ActionDAO<List<Approval>, OP_STATUS, Fu return Result.err(Result.ERR_ActionNotCompleted,"Not Executed"); } else { // Save on Lookups - final List<ApprovalDAO.Data> apprs = new ArrayList<ApprovalDAO.Data>(); - final List<UserRoleDAO.Data> urs = new ArrayList<UserRoleDAO.Data>(); + final List<ApprovalDAO.Data> apprs = new ArrayList<>(); + final List<UserRoleDAO.Data> urs = new ArrayList<>(); for(Approval a : app) { apprs.add(a.add); UserRole ur = UserRole.get(a.add.user, future.role); |