Merge "Fix sending email for notify config with dir filter on post of change message"

This commit is contained in:
Edwin Kempin
2019-07-22 09:29:13 +00:00
committed by Gerrit Code Review
3 changed files with 38 additions and 2 deletions

View File

@@ -17,7 +17,6 @@ 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.common.flogger.FluentLogger;
import com.google.gerrit.common.data.FilenameComparator;
import com.google.gerrit.exceptions.EmailException;
@@ -135,7 +134,6 @@ public class CommentSender extends ReplyToChangeSender {
paths.add(c.key.filename);
}
}
changeData.setCurrentFilePaths(Ordering.natural().sortedCopy(paths));
}
public void setPatchSetComment(String comment) {

View File

@@ -19,6 +19,7 @@ import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
import com.google.auto.value.AutoValue;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableListMultimap;
@@ -364,6 +365,7 @@ public class ChangeData {
return allUsersName;
}
@VisibleForTesting
public void setCurrentFilePaths(List<String> filePaths) {
PatchSet ps = currentPatchSet();
if (ps != null) {