Fix Guice bindings in reindex
Commit 218c6b69c2
broke the reindex
program.
Change-Id: I91d4e3dceed5702fa928131c927a07ef9e1528c1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
parent
1037ce769f
commit
01ed657015
@ -206,4 +206,8 @@ public abstract class DynamicMap<T> implements Iterable<DynamicMap.Entry<T>> {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> DynamicMap<T> emptyMap() {
|
||||
return new DynamicMap<T>() {};
|
||||
}
|
||||
}
|
||||
|
@ -17,12 +17,14 @@ package com.google.gerrit.pgm;
|
||||
import static com.google.gerrit.server.schema.DataSourceProvider.Context.MULTI_USER;
|
||||
import static com.google.inject.Scopes.SINGLETON;
|
||||
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.gerrit.common.ChangeHooks;
|
||||
import com.google.gerrit.common.DisabledChangeHooks;
|
||||
import com.google.gerrit.extensions.events.GitReferenceUpdatedListener;
|
||||
import com.google.gerrit.extensions.events.LifecycleListener;
|
||||
import com.google.gerrit.extensions.registration.DynamicMap;
|
||||
import com.google.gerrit.extensions.registration.DynamicSet;
|
||||
import com.google.gerrit.lifecycle.LifecycleManager;
|
||||
import com.google.gerrit.lifecycle.LifecycleModule;
|
||||
@ -195,6 +197,8 @@ public class Reindex extends SiteProgram {
|
||||
// once, so don't worry about cache removal.
|
||||
bind(new TypeLiteral<DynamicSet<CacheRemovalListener>>() {})
|
||||
.toInstance(DynamicSet.<CacheRemovalListener> emptySet());
|
||||
bind(new TypeLiteral<DynamicMap<Cache<?, ?>>>() {})
|
||||
.toInstance(DynamicMap.<Cache<?, ?>> emptyMap());
|
||||
bind(new TypeLiteral<List<CommentLinkInfo>>() {})
|
||||
.toProvider(CommentLinkProvider.class).in(SINGLETON);
|
||||
bind(String.class).annotatedWith(CanonicalWebUrl.class)
|
||||
|
Loading…
Reference in New Issue
Block a user