Explicitly bind ChangeMergeQueue

Otherwise this may be created in the wrong injector context, which
causes all sorts of other downstream failures like MergeOp.Factory
being unable to locate critical parts of GerritGlobalModule.

Change-Id: Ibb3ddd1392a789afcf138ecd074caf778646b809
This commit is contained in:
Shawn O. Pearce 2012-01-23 15:35:17 -08:00
parent a595eacf30
commit ad3209eebf
2 changed files with 3 additions and 0 deletions

View File

@ -129,6 +129,7 @@ public class GerritGlobalModule extends FactoryModule {
factory(SecureCredentialsProvider.Factory.class);
factory(PushAllProjectsOp.Factory.class);
bind(ChangeMergeQueue.class).in(SINGLETON);
bind(MergeQueue.class).to(ChangeMergeQueue.class).in(SINGLETON);
factory(ReloadSubmitQueueOp.Factory.class);

View File

@ -29,6 +29,7 @@ import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.OutOfScopeException;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import com.google.inject.servlet.RequestScoped;
import com.jcraft.jsch.HostKey;
@ -43,6 +44,7 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Singleton
public class ChangeMergeQueue implements MergeQueue {
private static final Logger log =
LoggerFactory.getLogger(ChangeMergeQueue.class);