AtomicityHelper: Remove usage of deprecated SubmitInput.waitForMerge
SubmitInput.waitForMerge is deprecated since the merge queue was
removed in I089a5cf49 which was included in Gerrit 2.12.
Remove usage of it, and simplify the call to Submit.apply() by
inlining the input and resource.
Change-Id: I3b55501b764bac24a1aad5ce8ea0c5b87e3d71ad
diff --git a/src/main/java/com/criteo/gerrit/plugins/automerge/AtomicityHelper.java b/src/main/java/com/criteo/gerrit/plugins/automerge/AtomicityHelper.java
index 18471b3..db37a37 100644
--- a/src/main/java/com/criteo/gerrit/plugins/automerge/AtomicityHelper.java
+++ b/src/main/java/com/criteo/gerrit/plugins/automerge/AtomicityHelper.java
@@ -154,10 +154,7 @@
*/
public void mergeReview(String project, int changeNumber)
throws RestApiException, NoSuchChangeException, OrmException, IOException {
- final SubmitInput input = new SubmitInput();
- input.waitForMerge = true;
- final RevisionResource r = getRevisionResource(project, changeNumber);
- submitter.apply(r, input);
+ submitter.apply(getRevisionResource(project, changeNumber), new SubmitInput());
}
public RevisionResource getRevisionResource(String project, int changeNumber)