Issue 530

This new method will be useful later.
This commit is contained in:
Daniel Applebaum 2009-07-24 05:12:17 +00:00
parent f6c6012e11
commit 280ed0dadd
1 changed files with 13 additions and 8 deletions

View File

@ -599,15 +599,20 @@ public class Account implements Serializable {
public boolean isAnIdentity(Address addr)
{
for (Identity identity : identities)
{
String email = identity.getEmail();
if (email != null && email.equalsIgnoreCase(addr.getAddress()))
{
return true;
return findIdentity(addr) != null;
}
}
return false;
public Identity findIdentity(Address addr)
{
for (Identity identity : identities)
{
String email = identity.getEmail();
if (email != null && email.equalsIgnoreCase(addr.getAddress()))
{
return identity;
}
}
return null;
}
public int getDisplayCount() {