Move CommitValidators.Factory binding to GerritGlobalModule

The factory(CommitValidators.Factory) binding is done in the
GerritRequestModule, but this is not early enough and means it
is not possible to use it for example in validation of revert
commits.

Move the binding to the GerritGlobalModule.

Change-Id: Id1c4aefd100b5d03f9890815435511e8cff27186
This commit is contained in:
Gustaf Lundh
2013-01-08 15:57:00 +01:00
committed by David Pursehouse
parent 3df58517e5
commit e426eb163c
2 changed files with 2 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ import com.google.gerrit.server.git.ReloadSubmitQueueOp;
import com.google.gerrit.server.git.TagCache;
import com.google.gerrit.server.git.TransferConfig;
import com.google.gerrit.server.git.validators.CommitValidationListener;
import com.google.gerrit.server.git.validators.CommitValidators;
import com.google.gerrit.server.mail.EmailModule;
import com.google.gerrit.server.mail.FromAddressGenerator;
import com.google.gerrit.server.mail.FromAddressGeneratorProvider;
@@ -206,6 +207,7 @@ public class GerritGlobalModule extends FactoryModule {
DynamicSet.setOf(binder(), NewProjectCreatedListener.class);
DynamicSet.bind(binder(), GitReferenceUpdatedListener.class).to(ChangeCache.class);
DynamicSet.setOf(binder(), CommitValidationListener.class);
factory(CommitValidators.Factory.class);
bind(AnonymousUser.class);

View File

@@ -32,7 +32,6 @@ import com.google.gerrit.server.git.CreateCodeReviewNotes;
import com.google.gerrit.server.git.MergeOp;
import com.google.gerrit.server.git.MetaDataUpdate;
import com.google.gerrit.server.git.SubmoduleOp;
import com.google.gerrit.server.git.validators.CommitValidators;
import com.google.gerrit.server.mail.AddReviewerSender;
import com.google.gerrit.server.mail.CommitMessageEditedSender;
import com.google.gerrit.server.mail.CreateChangeSender;
@@ -90,6 +89,5 @@ public class GerritRequestModule extends FactoryModule {
factory(CreateProject.Factory.class);
factory(SuggestParentCandidates.Factory.class);
factory(BanCommit.Factory.class);
factory(CommitValidators.Factory.class);
}
}