Inject ApprovalsUtil in more places
Replace static methods taking a ReviewDb with instance methods. Change-Id: I12d17fe122144183eeb142918a0176bc48e1705c
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user