Remove now-unused Context#getDb() method
The ReviewDb argument is now only used in the factory method, which will require a bunch more cleanup of callers, so leave it for now. Change-Id: I3748a3e65e754f243279705f28581aa16c359ec5
This commit is contained in:
		| @@ -280,11 +280,6 @@ public class BatchUpdate implements AutoCloseable { | ||||
|       return tz; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public ReviewDb getDb() { | ||||
|       return db; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public CurrentUser getUser() { | ||||
|       return user; | ||||
| @@ -364,7 +359,6 @@ public class BatchUpdate implements AutoCloseable { | ||||
|   private final ChangeIndexer indexer; | ||||
|   private final GitReferenceUpdated gitRefUpdated; | ||||
|  | ||||
|   private final ReviewDb db; | ||||
|   private final Project.NameKey project; | ||||
|   private final CurrentUser user; | ||||
|   private final Timestamp when; | ||||
| @@ -391,7 +385,7 @@ public class BatchUpdate implements AutoCloseable { | ||||
|       NoteDbUpdateManager.Factory updateManagerFactory, | ||||
|       ChangeIndexer indexer, | ||||
|       GitReferenceUpdated gitRefUpdated, | ||||
|       @Assisted ReviewDb db, | ||||
|       @SuppressWarnings("unused") @Assisted ReviewDb db, | ||||
|       @Assisted Project.NameKey project, | ||||
|       @Assisted CurrentUser user, | ||||
|       @Assisted Timestamp when) { | ||||
| @@ -401,7 +395,6 @@ public class BatchUpdate implements AutoCloseable { | ||||
|     this.updateManagerFactory = updateManagerFactory; | ||||
|     this.indexer = indexer; | ||||
|     this.gitRefUpdated = gitRefUpdated; | ||||
|     this.db = db; | ||||
|     this.project = project; | ||||
|     this.user = user; | ||||
|     this.when = when; | ||||
|   | ||||
| @@ -18,7 +18,6 @@ import static java.util.Objects.requireNonNull; | ||||
|  | ||||
| import com.google.gerrit.reviewdb.client.Account; | ||||
| import com.google.gerrit.reviewdb.client.Project; | ||||
| import com.google.gerrit.reviewdb.server.ReviewDb; | ||||
| import com.google.gerrit.server.CurrentUser; | ||||
| import com.google.gerrit.server.IdentifiedUser; | ||||
| import com.google.gerrit.server.account.AccountState; | ||||
| @@ -76,16 +75,6 @@ public interface Context { | ||||
|    */ | ||||
|   TimeZone getTimeZone(); | ||||
|  | ||||
|   /** | ||||
|    * Get the ReviewDb database. | ||||
|    * | ||||
|    * <p>Callers should not manage transactions or call mutating methods on the Changes table. | ||||
|    * Mutations on other tables (including other entities in the change entity group) are fine. | ||||
|    * | ||||
|    * @return open database instance. | ||||
|    */ | ||||
|   ReviewDb getDb(); | ||||
|  | ||||
|   /** | ||||
|    * Get the user performing the update. | ||||
|    * | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dave Borowitz
					Dave Borowitz