OutgoingEmail#getUserNameEmailFor: Protect against null accountId
If the accountId is null, just return null. Change-Id: Ibb6994a5b137fc898e54eef11d676fec35a1fad7
This commit is contained in:
@@ -378,6 +378,9 @@ public abstract class OutgoingEmail {
|
||||
* @return name/email of account, username, or null if unset.
|
||||
*/
|
||||
public String getUserNameEmailFor(Account.Id accountId) {
|
||||
if (accountId == null) {
|
||||
return null;
|
||||
}
|
||||
AccountState who = args.accountCache.get(accountId);
|
||||
String name = who.getAccount().getFullName();
|
||||
String email = who.getAccount().getPreferredEmail();
|
||||
|
Reference in New Issue
Block a user