Merge changes I62cb98f6,I1c5576b4,I61ae5780

* changes:
  Make ExternalIds and ExternalIdCache return immutable collections
  Implement cache for DefaultPreferences
  Serialize AccountCache
This commit is contained in:
Patrick Hiesel
2020-04-15 07:22:29 +00:00
committed by Gerrit Code Review
45 changed files with 974 additions and 1104 deletions

View File

@@ -16,7 +16,6 @@ package com.google.gerrit.testing;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.entities.Account;
import com.google.gerrit.server.account.AccountCache;
import com.google.gerrit.server.account.AccountState;
@@ -61,18 +60,6 @@ public class FakeAccountCache implements AccountCache {
throw new UnsupportedOperationException();
}
@Override
public synchronized void evict(@Nullable Account.Id accountId) {
if (byId != null) {
byId.remove(accountId);
}
}
@Override
public synchronized void evictAll() {
byId.clear();
}
public synchronized void put(Account account) {
AccountState state = newState(account);
byId.put(account.id(), state);