Skip to content
Snippets Groups Projects
Commit a3d98967 authored by srosse's avatar srosse
Browse files

OO-1434: loop a copy of the map which is clean up to prevent concurrent modification exception

parent 6fbe0e36
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,9 @@ public class ContactMessage { ...@@ -103,7 +103,9 @@ public class ContactMessage {
} }
private ContactList cleanEMailList(ContactList emailList) { private ContactList cleanEMailList(ContactList emailList) {
for (Identity identity: emailList.getIdentiEmails().values()) { Identity[] identityMails = emailList.getIdentiEmails().values()
.toArray(new Identity[emailList.getIdentiEmails().size()]);
for (Identity identity:identityMails) {
if(MailHelper.isDisabledMailAddress(identity, null)) { if(MailHelper.isDisabledMailAddress(identity, null)) {
emailList.remove(identity); emailList.remove(identity);
if(!disabledIdentities.contains(identity)) { if(!disabledIdentities.contains(identity)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment