summaryrefslogtreecommitdiffstats
path: root/java/com/google/gerrit/server/mail/send/ProjectWatch.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/google/gerrit/server/mail/send/ProjectWatch.java')
-rw-r--r--java/com/google/gerrit/server/mail/send/ProjectWatch.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/java/com/google/gerrit/server/mail/send/ProjectWatch.java b/java/com/google/gerrit/server/mail/send/ProjectWatch.java
index 173b1212cb..9299d74a6a 100644
--- a/java/com/google/gerrit/server/mail/send/ProjectWatch.java
+++ b/java/com/google/gerrit/server/mail/send/ProjectWatch.java
@@ -30,6 +30,7 @@ import com.google.gerrit.server.CurrentUser;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.account.AccountState;
import com.google.gerrit.server.account.ProjectWatches.ProjectWatchKey;
+import com.google.gerrit.server.mail.send.ProjectWatch.Watchers.WatcherList;
import com.google.gerrit.server.project.ProjectState;
import com.google.gerrit.server.query.change.ChangeData;
import com.google.gerrit.server.query.change.ChangeQueryBuilder;
@@ -111,13 +112,13 @@ public class ProjectWatch {
}
public static class Watchers {
- static class List {
+ static class WatcherList {
protected final Set<Account.Id> accounts = new HashSet<>();
protected final Set<Address> emails = new HashSet<>();
- private static List union(List... others) {
- List union = new List();
- for (List other : others) {
+ private static WatcherList union(WatcherList... others) {
+ WatcherList union = new WatcherList();
+ for (WatcherList other : others) {
union.accounts.addAll(other.accounts);
union.emails.addAll(other.emails);
}
@@ -125,15 +126,15 @@ public class ProjectWatch {
}
}
- protected final List to = new List();
- protected final List cc = new List();
- protected final List bcc = new List();
+ protected final WatcherList to = new WatcherList();
+ protected final WatcherList cc = new WatcherList();
+ protected final WatcherList bcc = new WatcherList();
- List all() {
- return List.union(to, cc, bcc);
+ WatcherList all() {
+ return WatcherList.union(to, cc, bcc);
}
- List list(NotifyConfig.Header header) {
+ WatcherList list(NotifyConfig.Header header) {
switch (header) {
case TO:
return to;
@@ -171,7 +172,7 @@ public class ProjectWatch {
}
}
- private void deliverToMembers(Watchers.List matching, AccountGroup.UUID startUUID) {
+ private void deliverToMembers(WatcherList matching, AccountGroup.UUID startUUID) {
Set<AccountGroup.UUID> seen = new HashSet<>();
List<AccountGroup.UUID> q = new ArrayList<>();