Remove ChangeQueryRewriter interface

Since killing BasicChangeRewrites in I99ee9254, IndexRewriteImpl is
the only implementation of ChangeQueryRewriter. There is no longer a
need for this to be an interface; callers can inject IndexRewriter
directly.

While we're in there, make IndexRewriter a @Singleton, since it has no
per-instance state.

Change-Id: I88640c8127cdfee10a949e62f55c759e64945579
This commit is contained in:
Dave Borowitz
2015-10-28 11:13:21 -04:00
parent 264198a5ff
commit bbe2cc6e8b
7 changed files with 23 additions and 45 deletions

View File

@@ -22,7 +22,6 @@ import com.google.common.util.concurrent.MoreExecutors;
import com.google.gerrit.lifecycle.LifecycleModule;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.git.WorkQueue;
import com.google.gerrit.server.query.change.ChangeQueryRewriter;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Provides;
@@ -67,7 +66,7 @@ public class IndexModule extends LifecycleModule {
@Override
protected void configure() {
bind(ChangeQueryRewriter.class).to(IndexRewriteImpl.class);
bind(IndexRewriter.class);
bind(IndexCollection.class);
listener().to(IndexCollection.class);
factory(ChangeIndexer.Factory.class);