in src/main/java/com/googlesource/gerrit/plugins/batch/BatchStore.java [107:124]
public void save(Batch batch) throws IOException, NoSuchProjectException {
if (batch.state == Batch.State.DELETED) {
refUpdater.delete(getBranch(batch.id));
return;
}
if (batch.version != 0) {
throw new ConcurrentModificationException();
}
batch.version++;
batch.lastModified = new Date();
try {
gitFileFactory
.create(getFileNameKey(batch.id))
.write(gson.toJson(batch), "Batch created (batch plugin)");
} catch (ConfigInvalidException e) { // Not real, never going to be thrown
throw new RuntimeException(e);
}
}