From d7a48822ef38a1395f4efeab246b9439be74fca9 Mon Sep 17 00:00:00 2001 From: Patrick Hiesel Date: Thu, 2 Mar 2017 10:27:43 +0100 Subject: [PATCH] Conistently import Collectors.* statically Change-Id: I379008c39f586e9512301c30cf6bc2c937355274 --- .../google/gerrit/acceptance/edit/ChangeEditIT.java | 4 ++-- .../gerrit/acceptance/rest/change/AbstractSubmit.java | 5 ++--- .../gerrit/acceptance/rest/change/DraftChangeIT.java | 7 ++----- .../acceptance/rest/change/SuggestReviewersIT.java | 9 ++++----- .../com/google/gerrit/server/ReviewerRecommender.java | 4 ++-- .../gerrit/server/account/DeleteExternalIds.java | 4 ++-- .../com/google/gerrit/server/change/CommentJson.java | 10 +++------- .../com/google/gerrit/server/change/PostReview.java | 4 ++-- .../java/com/google/gerrit/server/git/MergeOp.java | 9 ++------- .../gerrit/server/mail/receive/MailProcessor.java | 5 +++-- .../google/gerrit/server/mail/send/CommentSender.java | 5 +++-- .../com/google/gerrit/server/project/DeleteRef.java | 4 ++-- .../google/gerrit/server/query/change/ChangeData.java | 7 ++++--- .../com/google/gerrit/server/schema/Schema_130.java | 5 +++-- .../com/google/gerrit/server/schema/Schema_131.java | 5 +++-- 15 files changed, 39 insertions(+), 48 deletions(-) diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/edit/ChangeEditIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/edit/ChangeEditIT.java index 08fe4a9489..9cb0b318b1 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/edit/ChangeEditIT.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/edit/ChangeEditIT.java @@ -21,6 +21,7 @@ import static com.google.gerrit.extensions.restapi.BinaryResultSubject.assertTha import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.SECONDS; +import static java.util.stream.Collectors.toList; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -64,7 +65,6 @@ import java.sql.Timestamp; import java.util.List; import java.util.Map; import java.util.Optional; -import java.util.stream.Collectors; import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository; import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.lib.ObjectId; @@ -824,7 +824,7 @@ public class ChangeEditIT extends AbstractDaemonTest { assertThat(ci.messages).isNotNull(); assertThat(ci.messages).hasSize(expectedMessages.size()); List actualMessages = - ci.messages.stream().map(message -> message.message).collect(Collectors.toList()); + ci.messages.stream().map(message -> message.message).collect(toList()); assertThat(actualMessages).containsExactlyElementsIn(expectedMessages).inOrder(); } } diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java index 6344cbe22c..5bd620685d 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java @@ -24,6 +24,7 @@ import static com.google.gerrit.extensions.client.ListChangesOption.SUBMITTABLE; import static com.google.gerrit.server.group.SystemGroupBackend.CHANGE_OWNER; import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS; import static java.util.concurrent.TimeUnit.SECONDS; +import static java.util.stream.Collectors.toList; import static org.junit.Assert.fail; import com.google.common.collect.ImmutableList; @@ -83,7 +84,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.stream.Collectors; import org.eclipse.jgit.diff.DiffFormatter; import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository; import org.eclipse.jgit.junit.TestRepository; @@ -464,8 +464,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest { // Check that the repo has the expected commits List log = getRemoteLog(); - List commitsInRepo = - log.stream().map(c -> c.getShortMessage()).collect(Collectors.toList()); + List commitsInRepo = log.stream().map(c -> c.getShortMessage()).collect(toList()); int expectedCommitCount = getSubmitType() == SubmitType.MERGE_ALWAYS ? 5 // initial commit + 3 commits + merge commit diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/DraftChangeIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/DraftChangeIT.java index 1b0d0237c8..ade0be4892 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/DraftChangeIT.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/DraftChangeIT.java @@ -16,6 +16,7 @@ package com.google.gerrit.acceptance.rest.change; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.TruthJUnit.assume; +import static java.util.stream.Collectors.toList; import com.google.common.collect.Iterables; import com.google.gerrit.acceptance.AbstractDaemonTest; @@ -46,7 +47,6 @@ import com.google.inject.Inject; import java.util.Collection; import java.util.EnumSet; import java.util.List; -import java.util.stream.Collectors; import org.eclipse.jgit.lib.Config; import org.junit.Test; @@ -272,10 +272,7 @@ public class DraftChangeIT extends AbstractDaemonTest { .get(EnumSet.of(ListChangesOption.ALL_REVISIONS)) .revisions .values(); - return revisionInfos - .stream() - .map(revisionInfo -> revisionInfo.draft) - .collect(Collectors.toList()); + return revisionInfos.stream().map(revisionInfo -> revisionInfo.draft).collect(toList()); } private class MarkChangeAsDraftUpdateOp extends BatchUpdate.Op { diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java index 9c972cb057..b4fef08b7b 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java @@ -41,7 +41,6 @@ import com.google.gerrit.server.group.GroupsCollection; import com.google.inject.Inject; import java.util.Arrays; import java.util.List; -import java.util.stream.Collectors; import org.junit.Before; import org.junit.Test; @@ -298,14 +297,14 @@ public class SuggestReviewersIT extends AbstractDaemonTest { setApiUser(user1); String changeId3 = createChangeFromApi(); List reviewers = suggestReviewers(changeId3, null, 4); - assertThat(reviewers.stream().map(r -> r.account._accountId).collect(Collectors.toList())) + assertThat(reviewers.stream().map(r -> r.account._accountId).collect(toList())) .containsExactly(reviewer1.id.get(), reviewer2.id.get()) .inOrder(); // check that existing reviewers are filtered out gApi.changes().id(changeId3).addReviewer(reviewer1.email); reviewers = suggestReviewers(changeId3, null, 4); - assertThat(reviewers.stream().map(r -> r.account._accountId).collect(Collectors.toList())) + assertThat(reviewers.stream().map(r -> r.account._accountId).collect(toList())) .containsExactly(reviewer2.id.get()) .inOrder(); } @@ -358,7 +357,7 @@ public class SuggestReviewersIT extends AbstractDaemonTest { setApiUser(userWhoLooksForSuggestions); List reviewers = suggestReviewers(createChangeFromApi(), "Pri", 4); - assertThat(reviewers.stream().map(r -> r.account._accountId).collect(Collectors.toList())) + assertThat(reviewers.stream().map(r -> r.account._accountId).collect(toList())) .containsExactly( reviewer1.id.get(), reviewer2.id.get(), userWhoOwns.id.get(), userWhoComments.id.get()) .inOrder(); @@ -398,7 +397,7 @@ public class SuggestReviewersIT extends AbstractDaemonTest { // Assert that reviewer1 is on top, even though reviewer2 has more reviews // in other projects - assertThat(reviewers.stream().map(r -> r.account._accountId).collect(Collectors.toList())) + assertThat(reviewers.stream().map(r -> r.account._accountId).collect(toList())) .containsExactly(reviewer1.id.get(), reviewer2.id.get()) .inOrder(); } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/ReviewerRecommender.java b/gerrit-server/src/main/java/com/google/gerrit/server/ReviewerRecommender.java index 121c1823a4..b79f4966a7 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/ReviewerRecommender.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/ReviewerRecommender.java @@ -15,6 +15,7 @@ package com.google.gerrit.server; import static com.google.gerrit.server.notedb.ReviewerStateInternal.REVIEWER; +import static java.util.stream.Collectors.toList; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; @@ -57,7 +58,6 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.lang.mutable.MutableDouble; import org.eclipse.jgit.lib.Config; @@ -191,7 +191,7 @@ public class ReviewerRecommender { .entrySet() .stream() .sorted(Collections.reverseOrder(Map.Entry.comparingByValue())); - List sortedSuggestions = sorted.map(Map.Entry::getKey).collect(Collectors.toList()); + List sortedSuggestions = sorted.map(Map.Entry::getKey).collect(toList()); return sortedSuggestions; } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/account/DeleteExternalIds.java b/gerrit-server/src/main/java/com/google/gerrit/server/account/DeleteExternalIds.java index aff843a908..42726dcff4 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/account/DeleteExternalIds.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/account/DeleteExternalIds.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.account; import static com.google.gerrit.server.account.ExternalId.SCHEME_USERNAME; +import static java.util.stream.Collectors.toMap; import com.google.gerrit.extensions.restapi.AuthException; import com.google.gerrit.extensions.restapi.BadRequestException; @@ -33,7 +34,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; import org.eclipse.jgit.errors.ConfigInvalidException; public class DeleteExternalIds implements RestModifyView> { @@ -77,7 +77,7 @@ public class DeleteExternalIds implements RestModifyView i.key(), i -> i)); + .collect(toMap(i -> i.key(), i -> i)); List toDelete = new ArrayList<>(); ExternalId.Key last = resource.getUser().getLastLoginExternalIdKey(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/CommentJson.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/CommentJson.java index 4651c6bb91..0ebd84ba16 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/CommentJson.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/CommentJson.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.change; import static com.google.gerrit.server.CommentsUtil.COMMENT_INFO_ORDER; +import static java.util.stream.Collectors.toList; import com.google.common.base.Strings; import com.google.common.collect.FluentIterable; @@ -38,7 +39,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.TreeMap; -import java.util.stream.Collectors; class CommentJson { @@ -191,7 +191,7 @@ class CommentJson { return null; } - return fixSuggestions.stream().map(this::toFixSuggestionInfo).collect(Collectors.toList()); + return fixSuggestions.stream().map(this::toFixSuggestionInfo).collect(toList()); } private FixSuggestionInfo toFixSuggestionInfo(FixSuggestion fixSuggestion) { @@ -199,11 +199,7 @@ class CommentJson { fixSuggestionInfo.fixId = fixSuggestion.fixId; fixSuggestionInfo.description = fixSuggestion.description; fixSuggestionInfo.replacements = - fixSuggestion - .replacements - .stream() - .map(this::toFixReplacementInfo) - .collect(Collectors.toList()); + fixSuggestion.replacements.stream().map(this::toFixReplacementInfo).collect(toList()); return fixSuggestionInfo; } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java index d9db739da0..91165a8431 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java @@ -20,6 +20,7 @@ import static com.google.gerrit.server.CommentsUtil.setCommentRevId; import static com.google.gerrit.server.notedb.ReviewerStateInternal.REVIEWER; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.stream.Collectors.joining; +import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toSet; import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST; @@ -112,7 +113,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -885,7 +885,7 @@ public class PostReview implements RestModifyView } private List toFixReplacements(List fixReplacementInfos) { - return fixReplacementInfos.stream().map(this::toFixReplacement).collect(Collectors.toList()); + return fixReplacementInfos.stream().map(this::toFixReplacement).collect(toList()); } private FixReplacement toFixReplacement(FixReplacementInfo fixReplacementInfo) { diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java index 452cceeec7..69ebf723a6 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import static java.util.Comparator.comparing; +import static java.util.stream.Collectors.toSet; import com.google.auto.value.AutoValue; import com.google.common.base.Joiner; @@ -76,7 +77,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.eclipse.jgit.errors.IncorrectObjectTypeException; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; @@ -500,12 +500,7 @@ public class MergeOp implements AutoCloseable { List strategies = new ArrayList<>(); Set allBranches = submoduleOp.getBranchesInOrder(); Set allCommits = - toSubmit - .values() - .stream() - .map(BranchBatch::commits) - .flatMap(Set::stream) - .collect(Collectors.toSet()); + toSubmit.values().stream().map(BranchBatch::commits).flatMap(Set::stream).collect(toSet()); for (Branch.NameKey branch : allBranches) { OpenRepo or = orm.getRepo(branch.getParentKey()); if (toSubmit.containsKey(branch)) { diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/receive/MailProcessor.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/receive/MailProcessor.java index ab82631b42..7b4aca532a 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/receive/MailProcessor.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/mail/receive/MailProcessor.java @@ -14,6 +14,8 @@ package com.google.gerrit.server.mail.receive; +import static java.util.stream.Collectors.toList; + import com.google.common.base.Strings; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableList; @@ -59,7 +61,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -177,7 +178,7 @@ public class MailProcessor { .stream() .filter(c -> (c.writtenOn.getTime() / 1000) == (metadata.timestamp.getTime() / 1000)) .sorted(CommentsUtil.COMMENT_ORDER) - .collect(Collectors.toList()); + .collect(toList()); Project.NameKey project = cd.project(); String changeUrl = canonicalUrl.get() + "#/c/" + cd.getId().get(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/send/CommentSender.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/send/CommentSender.java index 1ebda4bcc8..88363cbb9a 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/send/CommentSender.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/mail/send/CommentSender.java @@ -14,6 +14,8 @@ package com.google.gerrit.server.mail.send; +import static java.util.stream.Collectors.toList; + import com.google.common.base.Strings; import com.google.common.collect.Ordering; import com.google.gerrit.common.data.FilenameComparator; @@ -48,7 +50,6 @@ import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; -import java.util.stream.Collectors; import org.eclipse.jgit.lib.Repository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -527,7 +528,7 @@ public class CommentSender extends ReplyToChangeSender { } return map; }) - .collect(Collectors.toList()); + .collect(toList()); } private boolean hasQuote(List blocks) { diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/DeleteRef.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/DeleteRef.java index 943bdc40c8..77ff37a2d4 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/project/DeleteRef.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/DeleteRef.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.project; import static java.lang.String.format; +import static java.util.stream.Collectors.toList; import static org.eclipse.jgit.lib.Constants.R_TAGS; import static org.eclipse.jgit.transport.ReceiveCommand.Type.DELETE; @@ -31,7 +32,6 @@ import com.google.inject.assistedinject.AssistedInject; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import org.eclipse.jgit.errors.LockFailedException; import org.eclipse.jgit.lib.BatchRefUpdate; import org.eclipse.jgit.lib.NullProgressMonitor; @@ -174,7 +174,7 @@ public class DeleteRef { : refsToDelete .stream() .map(ref -> ref.startsWith(prefix) ? ref : prefix + ref) - .collect(Collectors.toList()); + .collect(toList()); for (String ref : refs) { batchUpdate.addCommand(createDeleteCommand(resource, r, ref)); } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java index 28d8da8c04..4065c281aa 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java @@ -18,6 +18,8 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import static com.google.gerrit.server.ApprovalsUtil.sortApprovals; import static java.util.stream.Collectors.toList; +import static java.util.stream.Collectors.toMap; +import static java.util.stream.Collectors.toSet; import com.google.auto.value.AutoValue; import com.google.common.base.MoreObjects; @@ -83,7 +85,6 @@ import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.function.Predicate; -import java.util.stream.Collectors; import java.util.stream.Stream; import org.eclipse.jgit.errors.IncorrectObjectTypeException; import org.eclipse.jgit.errors.MissingObjectException; @@ -108,7 +109,7 @@ public class ChangeData { } public static Map asMap(List changes) { - return changes.stream().collect(Collectors.toMap(ChangeData::getId, cd -> cd)); + return changes.stream().collect(toMap(ChangeData::getId, cd -> cd)); } public static void ensureChangeLoaded(Iterable changes) throws OrmException { @@ -999,7 +1000,7 @@ public class ChangeData { List comments = Stream.concat(publishedComments().stream(), robotComments().stream()).collect(toList()); - Set nonLeafSet = comments.stream().map(c -> c.parentUuid).collect(Collectors.toSet()); + Set nonLeafSet = comments.stream().map(c -> c.parentUuid).collect(toSet()); Long count = comments diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_130.java b/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_130.java index 5971c7b457..52f90b5b4d 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_130.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_130.java @@ -14,6 +14,8 @@ package com.google.gerrit.server.schema; +import static java.util.stream.Collectors.joining; + import com.google.gerrit.reviewdb.client.Project; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.GerritPersonIdent; @@ -26,7 +28,6 @@ import com.google.inject.Provider; import java.io.IOException; import java.util.SortedSet; import java.util.TreeSet; -import java.util.stream.Collectors; import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; @@ -70,6 +71,6 @@ public class Schema_130 extends SchemaVersion { } } ui.message("\tMigration completed: " + repoUpgraded.size() + " repositories updated:"); - ui.message("\t" + repoUpgraded.stream().map(n -> n.get()).collect(Collectors.joining(" "))); + ui.message("\t" + repoUpgraded.stream().map(n -> n.get()).collect(joining(" "))); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_131.java b/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_131.java index 725e813209..0387e357c0 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_131.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_131.java @@ -14,6 +14,8 @@ package com.google.gerrit.server.schema; +import static java.util.stream.Collectors.joining; + import com.google.gerrit.reviewdb.client.Project; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.GerritPersonIdent; @@ -27,7 +29,6 @@ import com.google.inject.Provider; import java.io.IOException; import java.util.SortedSet; import java.util.TreeSet; -import java.util.stream.Collectors; import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; @@ -70,6 +71,6 @@ public class Schema_131 extends SchemaVersion { } } ui.message("\tMigration completed: " + repoUpgraded.size() + " repositories updated:"); - ui.message("\t" + repoUpgraded.stream().map(n -> n.get()).collect(Collectors.joining(" "))); + ui.message("\t" + repoUpgraded.stream().map(n -> n.get()).collect(joining(" "))); } }