ReceiveCommits: Pass extra reviewers/CCs as a multimap
Using a single, immutable field reduces the amount of mutable state in ReceiveCommits, which is good in and of itself. In addition, it simplifies construction: now that the multimap is passed directly to the ReceiveCommits.Factory, there is no more need for the (Async)ReceiveCommits#init methods. Change-Id: I21ed0396596ce753853ff397ef08595849d0e72e
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.httpd;
|
||||
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.collect.ImmutableSetMultimap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.gerrit.common.data.Capable;
|
||||
import com.google.gerrit.extensions.registration.DynamicSet;
|
||||
@@ -294,9 +295,7 @@ public class GitOverHttpServlet extends GitServlet {
|
||||
throw new ServiceNotAuthorizedException();
|
||||
}
|
||||
|
||||
AsyncReceiveCommits arc = factory.create(pc, db);
|
||||
arc.init();
|
||||
|
||||
AsyncReceiveCommits arc = factory.create(pc, db, ImmutableSetMultimap.of());
|
||||
ReceivePack rp = arc.getReceivePack();
|
||||
req.setAttribute(ATT_ARC, arc);
|
||||
return rp;
|
||||
|
||||
Reference in New Issue
Block a user