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:
David Pursehouse
2017-12-15 19:11:51 +09:00
16 changed files with 49 additions and 42 deletions

View File

@@ -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()) {