Inject ApprovalsUtil in more places

Replace static methods taking a ReviewDb with instance methods.

Change-Id: I12d17fe122144183eeb142918a0176bc48e1705c
This commit is contained in:
Dave Borowitz
2013-12-03 10:50:51 -08:00
parent 2ede20d73d
commit 4f47ab7468
7 changed files with 22 additions and 12 deletions

View File

@@ -75,6 +75,7 @@ public class ChangeInserter {
@Inject
ChangeInserter(Provider<ReviewDb> dbProvider,
Provider<ApprovalsUtil> approvals,
PatchSetInfoFactory patchSetInfoFactory,
GitReferenceUpdated gitRefUpdated,
ChangeHooks hooks,
@@ -159,7 +160,7 @@ public class ChangeInserter {
db.patchSets().insert(Collections.singleton(patchSet));
db.changes().insert(Collections.singleton(change));
LabelTypes labelTypes = refControl.getProjectControl().getLabelTypes();
approvalsUtil.addReviewers(db, labelTypes, change, patchSet, patchSetInfo,
approvalsUtil.addReviewers(labelTypes, change, patchSet, patchSetInfo,
reviewers, Collections.<Account.Id> emptySet());
db.commit();
} finally {