AccountCacheImpl#ByNameLoader: Use account index to lookup usernames
If available, use the account index to find accounts by username. This is a preparation for moving the external ids from ReviewDb into git. Change-Id: I8fe3adc0a65e90e3e7a21641cfca7352c46a458f Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -294,12 +294,7 @@ public class PostGpgKeys implements RestModifyView<AccountResource, Input> {
|
||||
msg.append("GPG key ").append(externalId)
|
||||
.append(" associated with multiple accounts: ");
|
||||
Joiner.on(", ").appendTo(msg,
|
||||
Lists.transform(accountStates, new Function<AccountState, String>() {
|
||||
@Override
|
||||
public String apply(AccountState accountState) {
|
||||
return accountState.getAccount().getId().toString();
|
||||
}
|
||||
}));
|
||||
Lists.transform(accountStates, AccountState.ACCOUNT_ID_FUNCTION));
|
||||
log.error(msg.toString());
|
||||
throw new IllegalStateException(msg.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user