Merge branch 'stable-2.15'
* stable-2.15: Consistently import utility methods from Collectors as static ListMailFilter: Static import from Collectors Fix plugin IT test for plugins using @PluginData annotation Update hooks plugin to latest revision on master Change-Id: Ife8549cfaefb7a5ddab20164d8ac2ca23644d845
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.client.api;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
import com.google.gerrit.client.ErrorDialog;
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gerrit.client.VoidResult;
|
||||
@@ -28,7 +30,6 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.DialogBox;
|
||||
import com.google.gwtexpui.progress.client.ProgressBar;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/** Loads JavaScript plugins with a progress meter visible. */
|
||||
public class PluginLoader extends DialogBox {
|
||||
@@ -39,7 +40,7 @@ public class PluginLoader extends DialogBox {
|
||||
if (plugins == null || plugins.isEmpty()) {
|
||||
callback.onSuccess(VoidResult.create());
|
||||
} else {
|
||||
plugins = plugins.stream().filter(p -> p.endsWith(".js")).collect(Collectors.toList());
|
||||
plugins = plugins.stream().filter(p -> p.endsWith(".js")).collect(toList());
|
||||
if (plugins.isEmpty()) {
|
||||
callback.onSuccess(VoidResult.create());
|
||||
} else {
|
||||
|
@@ -18,6 +18,7 @@ import static com.google.common.truth.Truth.assertAbout;
|
||||
import static com.google.gerrit.extensions.api.changes.RecipientType.BCC;
|
||||
import static com.google.gerrit.extensions.api.changes.RecipientType.CC;
|
||||
import static com.google.gerrit.extensions.api.changes.RecipientType.TO;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@@ -48,7 +49,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -121,7 +121,7 @@ public abstract class AbstractNotificationTest extends AbstractDaemonTest {
|
||||
.stream()
|
||||
.map(Address::getEmail)
|
||||
.filter(e -> !recipients.get(TO).contains(e) && !recipients.get(CC).contains(e))
|
||||
.collect(Collectors.toList()));
|
||||
.collect(toList()));
|
||||
this.users = users;
|
||||
if (!message.headers().containsKey("X-Gerrit-MessageType")) {
|
||||
fail("a message was sent with X-Gerrit-MessageType header");
|
||||
@@ -162,7 +162,7 @@ public abstract class AbstractNotificationTest extends AbstractDaemonTest {
|
||||
}
|
||||
Truth.assertThat(header).isInstanceOf(AddressList.class);
|
||||
AddressList addrList = (AddressList) header;
|
||||
return addrList.getAddressList().stream().map(Address::getEmail).collect(Collectors.toList());
|
||||
return addrList.getAddressList().stream().map(Address::getEmail).collect(toList());
|
||||
}
|
||||
|
||||
public FakeEmailSenderSubject to(String... emails) {
|
||||
|
@@ -20,12 +20,16 @@ import com.google.gerrit.server.plugins.TestServerPlugin;
|
||||
import com.google.inject.Inject;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
|
||||
public class LightweightPluginDaemonTest extends AbstractDaemonTest {
|
||||
@Inject private PluginGuiceEnvironment env;
|
||||
|
||||
@Inject private PluginUser.Factory pluginUserFactory;
|
||||
|
||||
@Rule public TemporaryFolder tempDataDir = new TemporaryFolder();
|
||||
|
||||
private TestServerPlugin plugin;
|
||||
|
||||
@Before
|
||||
@@ -40,7 +44,8 @@ public class LightweightPluginDaemonTest extends AbstractDaemonTest {
|
||||
getClass().getClassLoader(),
|
||||
testPlugin.sysModule(),
|
||||
testPlugin.httpModule(),
|
||||
testPlugin.sshModule());
|
||||
testPlugin.sshModule(),
|
||||
tempDataDir.getRoot().toPath());
|
||||
|
||||
plugin.start(env);
|
||||
env.onStartPlugin(plugin);
|
||||
|
@@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.server.fixes;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static java.util.stream.Collectors.groupingBy;
|
||||
|
||||
import com.google.gerrit.common.RawInputUtil;
|
||||
import com.google.gerrit.extensions.restapi.BinaryResult;
|
||||
@@ -33,7 +34,6 @@ import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
|
||||
@@ -73,9 +73,7 @@ public class FixReplacementInterpreter {
|
||||
checkNotNull(fixReplacements, "Fix replacements must not be null");
|
||||
|
||||
Map<String, List<FixReplacement>> fixReplacementsPerFilePath =
|
||||
fixReplacements
|
||||
.stream()
|
||||
.collect(Collectors.groupingBy(fixReplacement -> fixReplacement.path));
|
||||
fixReplacements.stream().collect(groupingBy(fixReplacement -> fixReplacement.path));
|
||||
|
||||
List<TreeModification> treeModifications = new ArrayList<>();
|
||||
for (Map.Entry<String, List<FixReplacement>> entry : fixReplacementsPerFilePath.entrySet()) {
|
||||
|
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.server.git.strategy;
|
||||
|
||||
import static java.util.stream.Collectors.toSet;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Streams;
|
||||
import com.google.gerrit.extensions.client.SubmitType;
|
||||
@@ -31,7 +33,6 @@ import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
@@ -68,7 +69,7 @@ public class SubmitDryRun {
|
||||
repo.getRefDatabase().getRefs(Constants.R_TAGS).values().stream())
|
||||
.map(Ref::getObjectId)
|
||||
.filter(o -> o != null)
|
||||
.collect(Collectors.toSet());
|
||||
.collect(toSet());
|
||||
}
|
||||
|
||||
public static Set<RevCommit> getAlreadyAccepted(Repository repo, RevWalk rw) throws IOException {
|
||||
|
@@ -14,13 +14,14 @@
|
||||
|
||||
package com.google.gerrit.server.mail;
|
||||
|
||||
import static java.util.stream.Collectors.joining;
|
||||
|
||||
import com.google.gerrit.server.config.GerritServerConfig;
|
||||
import com.google.gerrit.server.mail.receive.MailMessage;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.Arrays;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -42,7 +43,7 @@ public class ListMailFilter implements MailFilter {
|
||||
ListMailFilter(@GerritServerConfig Config cfg) {
|
||||
this.mode = cfg.getEnum("receiveemail", "filter", "mode", ListFilterMode.OFF);
|
||||
String[] addresses = cfg.getStringList("receiveemail", "filter", "patterns");
|
||||
String concat = Arrays.asList(addresses).stream().collect(Collectors.joining("|"));
|
||||
String concat = Arrays.asList(addresses).stream().collect(joining("|"));
|
||||
this.mailPattern = Pattern.compile(concat);
|
||||
}
|
||||
|
||||
|
@@ -17,6 +17,7 @@ package com.google.gerrit.server.notedb;
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.gerrit.reviewdb.client.PatchLineComment.Status.PUBLISHED;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
@@ -31,7 +32,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;
|
||||
import org.eclipse.jgit.lib.CommitBuilder;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
@@ -139,7 +139,7 @@ public class DeleteCommentRewriter implements NoteDbRewriter {
|
||||
.values()
|
||||
.stream()
|
||||
.flatMap(n -> n.getComments().stream())
|
||||
.collect(Collectors.toMap(c -> c.key.uuid, c -> c));
|
||||
.collect(toMap(c -> c.key.uuid, c -> c));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -18,6 +18,7 @@ import static com.google.gerrit.server.ioutil.BasicSerialization.readEnum;
|
||||
import static com.google.gerrit.server.ioutil.BasicSerialization.readVarInt32;
|
||||
import static com.google.gerrit.server.ioutil.BasicSerialization.writeEnum;
|
||||
import static com.google.gerrit.server.ioutil.BasicSerialization.writeVarInt32;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.gerrit.reviewdb.client.CodedEnum;
|
||||
@@ -30,7 +31,6 @@ import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.eclipse.jgit.diff.Edit;
|
||||
import org.eclipse.jgit.diff.ReplaceEdit;
|
||||
|
||||
@@ -109,7 +109,7 @@ public class IntraLineDiff implements Serializable {
|
||||
for (int j = 0; j < innerCount; j++) {
|
||||
inner[j] = readEdit(in);
|
||||
}
|
||||
editArray[i] = new ReplaceEdit(editArray[i], toList(inner));
|
||||
editArray[i] = new ReplaceEdit(editArray[i], asList(inner));
|
||||
}
|
||||
}
|
||||
edits = ImmutableList.copyOf(editArray);
|
||||
@@ -128,7 +128,7 @@ public class IntraLineDiff implements Serializable {
|
||||
|
||||
private static ReplaceEdit copy(ReplaceEdit edit) {
|
||||
List<Edit> internalEdits =
|
||||
edit.getInternalEdits().stream().map(IntraLineDiff::copy).collect(Collectors.toList());
|
||||
edit.getInternalEdits().stream().map(IntraLineDiff::copy).collect(toList());
|
||||
return new ReplaceEdit(
|
||||
edit.getBeginA(), edit.getEndA(), edit.getBeginB(), edit.getEndB(), internalEdits);
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public class IntraLineDiff implements Serializable {
|
||||
return new Edit(beginA, endA, beginB, endB);
|
||||
}
|
||||
|
||||
private static List<Edit> toList(Edit[] l) {
|
||||
private static List<Edit> asList(Edit[] l) {
|
||||
return Collections.unmodifiableList(Arrays.asList(l));
|
||||
}
|
||||
}
|
||||
|
@@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.server.plugins;
|
||||
|
||||
import static java.util.Comparator.comparing;
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
import com.google.common.collect.Streams;
|
||||
import com.google.gerrit.common.data.GlobalCapability;
|
||||
@@ -30,7 +31,6 @@ import java.util.Locale;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
@@ -137,7 +137,7 @@ public class ListPlugins implements RestReadView<TopLevelResource> {
|
||||
if (limit > 0) {
|
||||
s = s.limit(limit);
|
||||
}
|
||||
return new TreeMap<>(s.collect(Collectors.toMap(p -> p.getName(), p -> toPluginInfo(p))));
|
||||
return new TreeMap<>(s.collect(toMap(p -> p.getName(), p -> toPluginInfo(p))));
|
||||
}
|
||||
|
||||
private void checkMatchOptions(boolean cond) throws BadRequestException {
|
||||
|
@@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.server.plugins;
|
||||
|
||||
import com.google.gerrit.server.PluginUser;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class TestServerPlugin extends ServerPlugin {
|
||||
private final ClassLoader classLoader;
|
||||
@@ -29,9 +30,10 @@ public class TestServerPlugin extends ServerPlugin {
|
||||
ClassLoader classloader,
|
||||
String sysName,
|
||||
String httpName,
|
||||
String sshName)
|
||||
String sshName,
|
||||
Path dataDir)
|
||||
throws InvalidPluginException {
|
||||
super(name, pluginCanonicalWebUrl, user, null, null, null, null, classloader);
|
||||
super(name, pluginCanonicalWebUrl, user, null, null, null, dataDir, classloader);
|
||||
this.classLoader = classloader;
|
||||
this.sysName = sysName;
|
||||
this.httpName = httpName;
|
||||
|
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.server.project;
|
||||
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.gerrit.common.data.LabelType;
|
||||
import com.google.gerrit.common.data.LabelValue;
|
||||
@@ -28,7 +30,6 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Singleton
|
||||
public class ProjectJson {
|
||||
@@ -48,9 +49,7 @@ public class ProjectJson {
|
||||
for (LabelType t : projectState.getLabelTypes().getLabelTypes()) {
|
||||
LabelTypeInfo labelInfo = new LabelTypeInfo();
|
||||
labelInfo.values =
|
||||
t.getValues()
|
||||
.stream()
|
||||
.collect(Collectors.toMap(LabelValue::formatValue, LabelValue::getText));
|
||||
t.getValues().stream().collect(toMap(LabelValue::formatValue, LabelValue::getText));
|
||||
labelInfo.defaultValue = t.getDefaultValue();
|
||||
info.labels.put(t.getName(), labelInfo);
|
||||
}
|
||||
|
@@ -89,7 +89,6 @@ import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.errors.RepositoryNotFoundException;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
@@ -1244,7 +1243,7 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
}
|
||||
|
||||
List<Predicate<ChangeData>> predicates =
|
||||
parts.stream().map(fullPredicateFunc).collect(Collectors.toList());
|
||||
parts.stream().map(fullPredicateFunc).collect(toList());
|
||||
return Predicate.and(predicates);
|
||||
}
|
||||
|
||||
|
@@ -49,6 +49,7 @@ import static com.google.gerrit.server.project.testing.Util.category;
|
||||
import static com.google.gerrit.server.project.testing.Util.value;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
import static java.util.stream.Collectors.joining;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static java.util.stream.Collectors.toSet;
|
||||
|
||||
@@ -154,7 +155,6 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
|
||||
import org.eclipse.jgit.junit.TestRepository;
|
||||
@@ -461,7 +461,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
assertThat(result.reviewers).isNotEmpty();
|
||||
ChangeInfo info = gApi.changes().id(changeId).get();
|
||||
Function<Collection<AccountInfo>, Collection<String>> toEmails =
|
||||
ais -> ais.stream().map(ai -> ai.email).collect(Collectors.toSet());
|
||||
ais -> ais.stream().map(ai -> ai.email).collect(toSet());
|
||||
assertThat(toEmails.apply(info.pendingReviewers.get(REVIEWER)))
|
||||
.containsExactly(
|
||||
admin.email, user1.email, user2.email, "byemail1@example.com", "byemail2@example.com");
|
||||
@@ -3230,7 +3230,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
@Test
|
||||
public void putTopicExceedLimitFails() throws Exception {
|
||||
String changeId = createChange().getChangeId();
|
||||
String topic = Stream.generate(() -> "t").limit(2049).collect(Collectors.joining());
|
||||
String topic = Stream.generate(() -> "t").limit(2049).collect(joining());
|
||||
|
||||
exception.expect(BadRequestException.class);
|
||||
exception.expectMessage("topic length exceeds the limit");
|
||||
|
@@ -19,6 +19,8 @@ import static com.google.common.truth.TruthJUnit.assume;
|
||||
import static com.google.gerrit.extensions.common.testing.DiffInfoSubject.assertThat;
|
||||
import static com.google.gerrit.extensions.common.testing.FileInfoSubject.assertThat;
|
||||
import static com.google.gerrit.reviewdb.client.Patch.COMMIT_MSG;
|
||||
import static java.util.stream.Collectors.joining;
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@@ -44,7 +46,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
import javax.imageio.ImageIO;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
@@ -64,7 +65,7 @@ public class RevisionDiffIT extends AbstractDaemonTest {
|
||||
private static final String FILE_CONTENT =
|
||||
IntStream.rangeClosed(1, 100)
|
||||
.mapToObj(number -> String.format("Line %d\n", number))
|
||||
.collect(Collectors.joining());
|
||||
.collect(joining());
|
||||
private static final String FILE_CONTENT2 = "1st line\n2nd line\n3rd line\n";
|
||||
|
||||
private boolean intraline;
|
||||
@@ -1286,7 +1287,7 @@ public class RevisionDiffIT extends AbstractDaemonTest {
|
||||
testRepo.reset(parentCommit);
|
||||
Map<String, String> files =
|
||||
Arrays.stream(removedFilePaths)
|
||||
.collect(Collectors.toMap(Function.identity(), path -> "Irrelevant content"));
|
||||
.collect(toMap(Function.identity(), path -> "Irrelevant content"));
|
||||
PushOneCommit push =
|
||||
pushFactory.create(db, admin.getIdent(), testRepo, "Remove files from repo", files);
|
||||
PushOneCommit.Result result = push.rm("refs/for/master");
|
||||
|
@@ -93,7 +93,6 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import org.eclipse.jgit.api.errors.GitAPIException;
|
||||
import org.eclipse.jgit.junit.TestRepository;
|
||||
@@ -353,14 +352,14 @@ public abstract class AbstractPushForReview extends AbstractDaemonTest {
|
||||
|
||||
@Test
|
||||
public void pushForMasterWithTopicInRefExceedLimitFails() throws Exception {
|
||||
String topic = Stream.generate(() -> "t").limit(2049).collect(Collectors.joining());
|
||||
String topic = Stream.generate(() -> "t").limit(2049).collect(joining());
|
||||
PushOneCommit.Result r = pushTo("refs/for/master/" + topic);
|
||||
r.assertErrorStatus("topic length exceeds the limit (2048)");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pushForMasterWithTopicAsOptionExceedLimitFails() throws Exception {
|
||||
String topic = Stream.generate(() -> "t").limit(2049).collect(Collectors.joining());
|
||||
String topic = Stream.generate(() -> "t").limit(2049).collect(joining());
|
||||
PushOneCommit.Result r = pushTo("refs/for/master%topic=" + topic);
|
||||
r.assertErrorStatus("topic length exceeds the limit (2048)");
|
||||
}
|
||||
|
@@ -18,6 +18,8 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static com.google.gerrit.acceptance.PushOneCommit.FILE_NAME;
|
||||
import static com.google.gerrit.acceptance.PushOneCommit.SUBJECT;
|
||||
import static java.util.stream.Collectors.groupingBy;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@@ -68,7 +70,6 @@ import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import org.eclipse.jgit.lib.ObjectReader;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
@@ -962,7 +963,7 @@ public class CommentsIT extends AbstractDaemonTest {
|
||||
.values()
|
||||
.stream()
|
||||
.flatMap(List::stream)
|
||||
.collect(Collectors.toList());
|
||||
.collect(toList());
|
||||
}
|
||||
|
||||
private CommentInput addComment(String changeId, String message) throws Exception {
|
||||
@@ -976,7 +977,7 @@ public class CommentsIT extends AbstractDaemonTest {
|
||||
private void addComments(String changeId, String revision, CommentInput... commentInputs)
|
||||
throws Exception {
|
||||
ReviewInput input = new ReviewInput();
|
||||
input.comments = Arrays.stream(commentInputs).collect(Collectors.groupingBy(c -> c.path));
|
||||
input.comments = Arrays.stream(commentInputs).collect(groupingBy(c -> c.path));
|
||||
gApi.changes().id(changeId).revision(revision).review(input);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user