BatchUpdate: Inline newContext method
Change-Id: I3f2d0fa03f07faa45ac16fae3147ab20f9764c25
diff --git a/java/com/google/gerrit/server/update/BatchUpdate.java b/java/com/google/gerrit/server/update/BatchUpdate.java
index dc9e097..de47baa 100644
--- a/java/com/google/gerrit/server/update/BatchUpdate.java
+++ b/java/com/google/gerrit/server/update/BatchUpdate.java
@@ -447,10 +447,6 @@
execute(BatchUpdateListener.NONE);
}
- private Context newContext() {
- return new ContextImpl();
- }
-
public BatchUpdate setRepository(Repository repo, RevWalk revWalk, ObjectInserter inserter) {
checkState(this.repoView == null, "repo already set");
repoView = new RepoView(repo, revWalk, inserter);
@@ -516,7 +512,7 @@
}
public BatchUpdate insertChange(InsertChangeOp op) throws IOException {
- Context ctx = newContext();
+ Context ctx = new ContextImpl();
Change c = op.createChange(ctx);
checkArgument(
!newChanges.containsKey(c.getId()), "only one op allowed to create change %s", c.getId());