Construct ChangeDatas with ChangeControls in REST handlers
This is strictly less work than constructing them with Changes, as ChangeControls never need to be lazily loaded. Unfortunately there are still many more callers where it was not obvious whether a ChangeControl could be passed in, so I just got the easy ones. Change-Id: Ic1c8c2f6aedb25df6c64595f3aecc0e9d2c96817
This commit is contained in:
@@ -289,7 +289,7 @@ public class PostReview implements RestModifyView<RevisionResource, ReviewInput>
|
||||
in.entrySet().iterator();
|
||||
Set<String> filePaths =
|
||||
Sets.newHashSet(changeDataFactory.create(
|
||||
db.get(), revision.getChange()).filePaths(
|
||||
db.get(), revision.getControl()).filePaths(
|
||||
revision.getPatchSet()));
|
||||
while (mapItr.hasNext()) {
|
||||
Map.Entry<String, List<CommentInput>> ent = mapItr.next();
|
||||
|
||||
@@ -94,7 +94,7 @@ public class TestSubmitRule implements RestModifyView<RevisionResource, Input> {
|
||||
rsrc.getControl().getProjectControl(),
|
||||
rsrc.getControl(),
|
||||
rsrc.getChange(),
|
||||
changeDataFactory.create(db.get(), rsrc.getChange()),
|
||||
changeDataFactory.create(db.get(), rsrc.getControl()),
|
||||
false,
|
||||
"locate_submit_rule", "can_submit",
|
||||
"locate_submit_filter", "filter_submit_results",
|
||||
|
||||
@@ -74,7 +74,7 @@ public class TestSubmitType implements RestModifyView<RevisionResource, Input> {
|
||||
rsrc.getControl().getProjectControl(),
|
||||
rsrc.getControl(),
|
||||
rsrc.getChange(),
|
||||
changeDataFactory.create(db.get(), rsrc.getChange()),
|
||||
changeDataFactory.create(db.get(), rsrc.getControl()),
|
||||
false,
|
||||
"locate_submit_type", "get_submit_type",
|
||||
"locate_submit_type_filter", "filter_submit_type_results",
|
||||
|
||||
Reference in New Issue
Block a user