Merge "AddMembers.apply: Prevent NPE when account doesn't exist" into stable-2.9

This commit is contained in:
David Pursehouse
2014-08-25 00:57:15 +00:00
committed by Gerrit Code Review

View File

@@ -163,7 +163,10 @@ public class AddMembers implements RestModifyView<GroupResource, Input> {
case LDAP: case LDAP:
if (accountResolver.find(nameOrEmail) == null) { if (accountResolver.find(nameOrEmail) == null) {
// account does not exist, try to create it // account does not exist, try to create it
return createAccountByLdap(nameOrEmail); Account a = createAccountByLdap(nameOrEmail);
if (a != null) {
return a;
}
} }
break; break;
default: default: