Merge branch 'stable-2.15' into stable-2.16
* stable-2.15: Upgrade google-java-format to 1.7 Change-Id: Ia7383822ef59fb60bb5559956a065ae46b2e4f4a
This commit is contained in:
@@ -139,17 +139,13 @@ abstract class GroupBundle {
|
||||
return create(
|
||||
Source.NOTE_DB,
|
||||
accountGroup,
|
||||
internalGroup
|
||||
.getMembers()
|
||||
.stream()
|
||||
internalGroup.getMembers().stream()
|
||||
.map(
|
||||
accountId ->
|
||||
new AccountGroupMember(new AccountGroupMember.Key(accountId, groupId)))
|
||||
.collect(toImmutableSet()),
|
||||
auditLogReader.getMembersAudit(repo, uuid),
|
||||
internalGroup
|
||||
.getSubgroups()
|
||||
.stream()
|
||||
internalGroup.getSubgroups().stream()
|
||||
.map(
|
||||
subgroupUuid ->
|
||||
new AccountGroupById(new AccountGroupById.Key(groupId, subgroupUuid)))
|
||||
@@ -518,8 +514,7 @@ abstract class GroupBundle {
|
||||
|
||||
private static ListMultimap<String, AuditEntry> toMemberAuditEntriesByMemberId(
|
||||
ImmutableSet<AccountGroupMemberAudit> memberAudits) {
|
||||
return memberAudits
|
||||
.stream()
|
||||
return memberAudits.stream()
|
||||
.flatMap(GroupBundle::toAuditEntries)
|
||||
.collect(
|
||||
Multimaps.toMultimap(
|
||||
@@ -550,8 +545,7 @@ abstract class GroupBundle {
|
||||
|
||||
private static ListMultimap<String, AuditEntry> toByIdAuditEntriesById(
|
||||
ImmutableSet<AccountGroupByIdAud> byIdAudits) {
|
||||
return byIdAudits
|
||||
.stream()
|
||||
return byIdAudits.stream()
|
||||
.flatMap(GroupBundle::toAuditEntries)
|
||||
.collect(
|
||||
Multimaps.toMultimap(
|
||||
@@ -587,15 +581,11 @@ abstract class GroupBundle {
|
||||
ListMultimap<String, AuditEntry> noteDbMemberAuditsByTarget) {
|
||||
for (String target : reviewDbMemberAuditsByTarget.keySet()) {
|
||||
ImmutableList<AuditEntry> reviewDbAuditEntries =
|
||||
reviewDbMemberAuditsByTarget
|
||||
.get(target)
|
||||
.stream()
|
||||
reviewDbMemberAuditsByTarget.get(target).stream()
|
||||
.sorted(AUDIT_ENTRY_COMPARATOR)
|
||||
.collect(toImmutableList());
|
||||
ImmutableSet<AuditEntry> noteDbAuditEntries =
|
||||
noteDbMemberAuditsByTarget
|
||||
.get(target)
|
||||
.stream()
|
||||
noteDbMemberAuditsByTarget.get(target).stream()
|
||||
.sorted(AUDIT_ENTRY_COMPARATOR)
|
||||
.collect(toImmutableSet());
|
||||
|
||||
|
||||
@@ -229,16 +229,12 @@ class GroupRebuilder {
|
||||
return b ->
|
||||
b.setMemberModification(
|
||||
in ->
|
||||
bundle
|
||||
.members()
|
||||
.stream()
|
||||
bundle.members().stream()
|
||||
.map(AccountGroupMember::getAccountId)
|
||||
.collect(toImmutableSet()))
|
||||
.setSubgroupModification(
|
||||
in ->
|
||||
bundle
|
||||
.byId()
|
||||
.stream()
|
||||
bundle.byId().stream()
|
||||
.map(AccountGroupById::getIncludeUUID)
|
||||
.collect(toImmutableSet()));
|
||||
}
|
||||
|
||||
@@ -76,11 +76,8 @@ public class Schema_135 extends SchemaVersion {
|
||||
|
||||
Set<GroupReference> groups =
|
||||
Stream.concat(
|
||||
config
|
||||
.getAccessSection(AccessSection.GLOBAL_CAPABILITIES, true)
|
||||
.getPermission(GlobalCapability.ADMINISTRATE_SERVER, true)
|
||||
.getRules()
|
||||
.stream()
|
||||
config.getAccessSection(AccessSection.GLOBAL_CAPABILITIES, true)
|
||||
.getPermission(GlobalCapability.ADMINISTRATE_SERVER, true).getRules().stream()
|
||||
.map(PermissionRule::getGroup),
|
||||
Stream.of(systemGroupBackend.getGroup(PROJECT_OWNERS)))
|
||||
.filter(g -> createRefsMetaConfigPermission.getRule(g) == null)
|
||||
|
||||
@@ -55,9 +55,7 @@ public class Schema_147 extends SchemaVersion {
|
||||
try (Repository repo = repoManager.openRepository(allUsersName)) {
|
||||
Set<Account.Id> accountIdsFromReviewDb = scanAccounts(db);
|
||||
Set<Account.Id> accountIdsFromUserBranches =
|
||||
repo.getRefDatabase()
|
||||
.getRefsByPrefix(RefNames.REFS_USERS)
|
||||
.stream()
|
||||
repo.getRefDatabase().getRefsByPrefix(RefNames.REFS_USERS).stream()
|
||||
.map(r -> Account.Id.fromRef(r.getName()))
|
||||
.filter(Objects::nonNull)
|
||||
.collect(toSet());
|
||||
|
||||
@@ -125,9 +125,7 @@ public class Schema_154 extends SchemaVersion {
|
||||
JdbcSchema schema = (JdbcSchema) db;
|
||||
Connection connection = schema.getConnection();
|
||||
Set<String> columns = schema.getDialect().listColumns(connection, TABLE);
|
||||
return ACCOUNT_FIELDS_MAP
|
||||
.entrySet()
|
||||
.stream()
|
||||
return ACCOUNT_FIELDS_MAP.entrySet().stream()
|
||||
.filter(e -> columns.contains(e.getKey()))
|
||||
.collect(toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
|
||||
@@ -77,9 +77,7 @@ public class Schema_161 extends SchemaVersion {
|
||||
starRef.labels(), StarredChangesUtil.UNREVIEWED_LABEL);
|
||||
|
||||
List<String> newLabels =
|
||||
starRef
|
||||
.labels()
|
||||
.stream()
|
||||
starRef.labels().stream()
|
||||
.map(
|
||||
l -> {
|
||||
if (l.startsWith(MUTE_LABEL)) {
|
||||
|
||||
Reference in New Issue
Block a user