NotesMigrationSchemaFactory: Remove NotesMigration check

Since NotesMigration now returns only constant values, this check is
redundant.

Change-Id: Ib4d89e01f1dc50192ee3fca8f8501272c5a4838d
This commit is contained in:
Dave Borowitz
2018-12-12 19:26:48 -08:00
parent 6fa0976620
commit 97a71a4adc

View File

@@ -14,8 +14,6 @@
package com.google.gerrit.server.schema;
import static com.google.common.base.Preconditions.checkState;
import com.google.gerrit.reviewdb.server.DisallowedReviewDb;
import com.google.gerrit.reviewdb.server.ReviewDb;
import com.google.gerrit.server.notedb.NotesMigration;
@@ -60,8 +58,6 @@ public class NotesMigrationSchemaFactory implements SchemaFactory<ReviewDb> {
// do nothing. This implementation is not a public class and callers couldn't do anything
// useful with it even if it were.
// First create the underlying stub.
checkState(migration.readChanges() && migration.disableChangeReviewDb());
// Disable writes to change tables in ReviewDb (ReviewDb access for changes are No-Ops); all
// other table accesses throw runtime exceptions.
ReviewDb db = new NoChangesReviewDb();